svg_loader: fixing color parsing
authorMira Grudzinska <m.grudzinska@samsung.com>
Wed, 16 Jun 2021 23:12:57 +0000 (01:12 +0200)
committerJunsuChoi <jsuya.choi@samsung.com>
Mon, 21 Jun 2021 02:39:34 +0000 (11:39 +0900)
For colors given in a style attribute in the format "rgb(rrr, ggg, bbb)"
a parsing was incorect. Now fixed.

src/loaders/svg/tvgSvgLoader.cpp

index 6f0bcb618077f9ccbe229ec390d4637e44b245e6..9e8f0a7938b37a5516e8499d4b2aba2f1c915132 100644 (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);