From 6794e0103b1656842b0df00867a3f84fa7b1ea47 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Sat, 9 Feb 2019 14:38:25 +0000 Subject: [PATCH] negative only alowed as first char --- src/SixLabors.Svg/RenderTree/SvgPathOperation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SixLabors.Svg/RenderTree/SvgPathOperation.cs b/src/SixLabors.Svg/RenderTree/SvgPathOperation.cs index 85eec50..3f4fea7 100644 --- a/src/SixLabors.Svg/RenderTree/SvgPathOperation.cs +++ b/src/SixLabors.Svg/RenderTree/SvgPathOperation.cs @@ -166,7 +166,7 @@ namespace SixLabors.Svg.Dom } // we can skip 'whitespace' } - if (char.IsDigit(str[position]) || str[position] == '-' || str[position] == '.') + if (char.IsDigit(str[position]) || (str[position] == '-' && floatStart == 0) || str[position] == '.') { if (floatStart == 0) { floatStart = position; } }