projects
/
platform
/
core
/
graphics
/
tizenvg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d249a6
)
svg_loader: fixing color parsing
34/289334/1
author
mgrudzinska
<m.grudzinska@samsung.com>
Sun, 3 Apr 2022 22:02:43 +0000
(
00:02
+0200)
committer
Michal Szczecinski
<mihashco89@gmail.com>
Mon, 6 Mar 2023 10:00:27 +0000
(11:00 +0100)
Color given in percentages, ex."rgb(10%,20%,30%)", was incorrectly parsed.
Change-Id: I0f81796c2b4e548564a5cb6ea1d374f706112245
src/loaders/svg/tvgSvgLoader.cpp
patch
|
blob
|
history
diff --git
a/src/loaders/svg/tvgSvgLoader.cpp
b/src/loaders/svg/tvgSvgLoader.cpp
index
cb056c4
..
9843ea7
100644
(file)
--- a/
src/loaders/svg/tvgSvgLoader.cpp
+++ b/
src/loaders/svg/tvgSvgLoader.cpp
@@
-337,7
+337,10
@@
static unsigned char _parserColor(const char* value, char** end)
r = svgUtilStrtof(value, end);
*end = _skipSpace(*end, nullptr);
- if (**end == '%') r = 255 * r / 100;
+ if (**end == '%') {
+ r = 255 * r / 100;
+ (*end)++;
+ }
*end = _skipSpace(*end, nullptr);
if (r < 0 || r > 255) {