aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cssparser.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 9bc10215..b25f1375 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -711,33 +711,30 @@ bool CssParser::parseRgbColor(int32_t *c) {
MSG_CSS("expected '%s' not found in rgb color\n", "(");
return false;
}
-
nextToken();
+
if (!parseRgbColorComponent(&cc))
return false;
-
*c |= cc;
if (ttype != CSS_TK_CHAR || tval[0] != ',') {
MSG_CSS("expected '%s' not found in rgb color\n", ",");
return false;
}
-
nextToken();
+
if (!parseRgbColorComponent(&cc))
return false;
-
*c |= cc << 8;
if (ttype != CSS_TK_CHAR || tval[0] != ',') {
MSG_CSS("expected '%s' not found in rgb color\n", ",");
return false;
}
-
nextToken();
+
if (!parseRgbColorComponent(&cc))
return false;
-
*c |= cc << 16;
if (ttype != CSS_TK_CHAR || tval[0] != ')') {