aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-19 16:49:14 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-01-19 16:49:14 +0100
commitc6b954eb51a3241cf0aa1924270b1240aa691a2a (patch)
treea756e80e15e7e381ef8d9aa14294f1c325daa7ed
parente4741d00aceb156cda445dfc827e7200fb53e945 (diff)
avoid looping on style="{}"
-rw-r--r--src/cssparser.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index f11e0a86..066a282d 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -1181,8 +1181,10 @@ CssPropertyList *a_Css_parse_declaration(const char *buf, int buflen)
parser.space_separated = false;
Css_next_token(&parser);
- while (parser.ttype != CSS_TK_END)
+ do
Css_parse_declaration(&parser, props, NULL);
+ while (!(parser.ttype == CSS_TK_END ||
+ (parser.ttype == CSS_TK_CHAR && parser.tval[0] == '}')));
if (props->size () == 0) {
delete props;