]> Pileus Git - ~andy/gtk/commitdiff
cssparser: Actually send an error in an error case
authorBenjamin Otte <otte@redhat.com>
Mon, 13 Jun 2011 04:24:10 +0000 (06:24 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 13 Jun 2011 13:01:52 +0000 (15:01 +0200)
The error case was excess commas in rgb/rgba colors, such as
rgba(0,255,0,0,0.5)

gtk/gtkcssparser.c

index 3aab85e67a89be7a20a9ace00427f9eb2ec9173a..80544515e1ba79ef8d0ebd3022974223b62624dd 100644 (file)
@@ -716,6 +716,7 @@ gtk_css_parser_read_symbolic_color_function (GtkCssParser *parser,
 
   if (!_gtk_css_parser_try (parser, ")", TRUE))
     {
+      _gtk_css_parser_error (parser, "Expected ')' in color definition");
       gtk_symbolic_color_unref (symbolic);
       return NULL;
     }