[gtk+/wip/clip: 4/6] css: Actually break at end of the string
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/clip: 4/6] css: Actually break at end of the string
- Date: Wed, 21 May 2014 21:51:36 +0000 (UTC)
commit 9541925a2300e27fbf8b2944f844d98a10e2e743
Author: Benjamin Otte <otte redhat com>
Date: Wed May 21 19:17:21 2014 +0200
css: Actually break at end of the string
Introduced in 65c4c1555d0634c063c3aa354620de260e4aaf7f.
Found by gnome-continuous running the testsuite.
gtk/gtkcssparser.c | 3 ++-
gtk/gtkcssstringvalue.c | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c
index de78ae6..a9bf5d4 100644
--- a/gtk/gtkcssparser.c
+++ b/gtk/gtkcssparser.c
@@ -1031,7 +1031,7 @@ _gtk_css_print_string (GString *str,
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, '"');
}
diff --git a/gtk/gtkcssstringvalue.c b/gtk/gtkcssstringvalue.c
index 5da9fef..56ccc69 100644
--- a/gtk/gtkcssstringvalue.c
+++ b/gtk/gtkcssstringvalue.c
@@ -88,7 +88,7 @@ gtk_css_value_ident_print (const GtkCssValue *value,
switch (*string)
{
case '\0':
- break;
+ goto out;
case '\n':
g_string_append (str, "\\A ");
break;
@@ -113,6 +113,9 @@ gtk_css_value_ident_print (const GtkCssValue *value,
}
string++;
} while (*string);
+
+out:
+ ;
}
static const GtkCssValueClass GTK_CSS_VALUE_STRING = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]