svg_loader: fixing color parsing

For colors given in a style attribute in the format "rgb(rrr, ggg, bbb)"
a parsing was incorect. Now fixed.
This commit is contained in:
Mira Grudzinska 2021-06-17 01:12:57 +02:00 committed by JunsuChoi
parent 20e926c950
commit 7ffeb2e606

View file

@ -277,7 +277,7 @@ static unsigned char _parserColor(const char* value, char** end)
{
float r;
r = svgUtilStrtof(value + 4, end);
r = svgUtilStrtof(value, end);
*end = _skipSpace(*end, nullptr);
if (**end == '%') r = 255 * r / 100;
*end = _skipSpace(*end, nullptr);