summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkcssparser.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c
index 13d63d4869..2d6a4df3d0 100644
--- a/gtk/gtkcssparser.c
+++ b/gtk/gtkcssparser.c
@@ -875,17 +875,20 @@ _gtk_css_parser_resync_internal (GtkCssParser *parser,
case '(':
parser->data++;
_gtk_css_parser_resync (parser, FALSE, ')');
- parser->data++;
+ if (*parser->data)
+ parser->data++;
break;
case '[':
parser->data++;
_gtk_css_parser_resync (parser, FALSE, ']');
- parser->data++;
+ if (*parser->data)
+ parser->data++;
break;
case '{':
parser->data++;
_gtk_css_parser_resync (parser, FALSE, '}');
- parser->data++;
+ if (*parser->data)
+ parser->data++;
if (sync_at_semicolon || !terminator)
{
_gtk_css_parser_skip_whitespace (parser);
@@ -902,6 +905,8 @@ _gtk_css_parser_resync_internal (GtkCssParser *parser,
}
parser->data++;
continue;
+ case '\0':
+ break;
case '/':
default:
parser->data++;