mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-25 23:59:12 +00:00
svg_loader: fix dead loop on none digit char in stroke-dasharray fix #2
Moved _skipComma at the begining of the loop
This commit is contained in:
parent
2f8c00580d
commit
bf8c633d38
1 changed files with 2 additions and 2 deletions
|
@ -250,8 +250,8 @@ _parseDashArray(const char *str, SvgDash* dash)
|
|||
|
||||
char *end = nullptr;
|
||||
|
||||
str = _skipComma(str);
|
||||
while (*str) {
|
||||
str = _skipComma(str);
|
||||
float parsedValue = svgUtilStrtof(str, &end);
|
||||
if (str == end) break;
|
||||
if (*end == '%') {
|
||||
|
@ -259,7 +259,7 @@ _parseDashArray(const char *str, SvgDash* dash)
|
|||
//TODO: multiply percentage value
|
||||
}
|
||||
(*dash).array.push(parsedValue);
|
||||
str = _skipComma(end);
|
||||
str = end;
|
||||
}
|
||||
//If dash array size is 1, it means that dash and gap size are the same.
|
||||
if ((*dash).array.count == 1) (*dash).array.push((*dash).array.data[0]);
|
||||
|
|
Loading…
Add table
Reference in a new issue