mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +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);
|
||||
float parsedValue = svgUtilStrtof(str, &end);
|
||||
if (str == end) break;
|
||||
if (parsedValue <= 0.0f) break;
|
||||
if (*end == '%') {
|
||||
++end;
|
||||
//TODO: multiply percentage value
|
||||
|
|
Loading…
Add table
Reference in a new issue