Fixed how sign is applied for fractions

This commit is contained in:
Mikko Mononen 2017-07-01 18:07:55 +03:00
parent 9b51689812
commit 47697e1414

View File

@ -1110,7 +1110,7 @@ static double nsvg__atof(const char* s)
// Parse digit sequence // Parse digit sequence
fracPart = strtoll(cur, &end, 10); fracPart = strtoll(cur, &end, 10);
if (cur != end) { if (cur != end) {
res += (double)fracPart / pow(10.0, (double)(end - cur)) * sign; res += (double)fracPart / pow(10.0, (double)(end - cur));
hasFracPart = 1; hasFracPart = 1;
cur = end; cur = end;
} }