mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 11:36:25 +00:00
svg_loader: fix dead loop on none digit char in stroke-dasharray fix #3
Added zero and negative value protection
This commit is contained in:
parent
bf8c633d38
commit
7a8d7ceac6
1 changed files with 1 additions and 0 deletions
|
@ -254,6 +254,7 @@ _parseDashArray(const char *str, SvgDash* dash)
|
||||||
str = _skipComma(str);
|
str = _skipComma(str);
|
||||||
float parsedValue = svgUtilStrtof(str, &end);
|
float parsedValue = svgUtilStrtof(str, &end);
|
||||||
if (str == end) break;
|
if (str == end) break;
|
||||||
|
if (parsedValue <= 0.0f) break;
|
||||||
if (*end == '%') {
|
if (*end == '%') {
|
||||||
++end;
|
++end;
|
||||||
//TODO: multiply percentage value
|
//TODO: multiply percentage value
|
||||||
|
|
Loading…
Add table
Reference in a new issue