diff options
author | Benjamin Otte <otte@redhat.com> | 2014-05-21 19:17:21 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-05-22 02:13:49 +0200 |
commit | b90802f7e44f280b9ea233cf71692704e5b52651 (patch) | |
tree | 2664704c9028bfd8808773b8c9c74d9b9a793fec /gtk/gtkcssparser.c | |
parent | 9ae12b15e93860cd65f743d5041addc5a89007f6 (diff) | |
download | gtk+-b90802f7e44f280b9ea233cf71692704e5b52651.tar.gz |
css: Actually break at end of the string
Introduced in 65c4c1555d0634c063c3aa354620de260e4aaf7f.
Found by gnome-continuous running the testsuite.
Includes fixing a broken test in the testsuite.
Diffstat (limited to 'gtk/gtkcssparser.c')
-rw-r--r-- | gtk/gtkcssparser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c index de78ae6fb1..644592bc92 100644 --- a/gtk/gtkcssparser.c +++ b/gtk/gtkcssparser.c @@ -1025,13 +1025,13 @@ _gtk_css_print_string (GString *str, g_string_append_c (str, '"'); do { - len = strcspn (string, "\"\n\r\f"); + len = strcspn (string, "\\\"\n\r\f"); g_string_append_len (str, string, len); string += len; switch (*string) { case '\0': - break; + goto out; case '\n': g_string_append (str, "\\A "); break; @@ -1054,6 +1054,7 @@ _gtk_css_print_string (GString *str, string++; } while (*string); +out: g_string_append_c (str, '"'); } |