diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-04-06 12:45:55 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-04-06 12:45:55 +0000 |
commit | 4d74d5e0cdf7929f3adc84220f9d724f2d55c9d9 (patch) | |
tree | 52f9a9243d5dce3a3b54a97f8e5fe11bb97acde1 /gtk/gtkrc.c | |
parent | 1e8326d418ac8ec3040ac03832cd31002af70d29 (diff) | |
download | gtk+-4d74d5e0cdf7929f3adc84220f9d724f2d55c9d9.tar.gz |
Don't modify scanner->value, copy it first. (#165693, Tommi Komulainen)
2005-04-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_style): Don't modify scanner->value,
copy it first. (#165693, Tommi Komulainen)
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r-- | gtk/gtkrc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 1953cd0844..82221c8e54 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2696,6 +2696,7 @@ gtk_rc_parse_style (GtkRcContext *context, scanner->next_value.v_identifier[0] <= 'Z') /* match namespaced type names */ { GtkRcProperty prop = { 0, 0, NULL, { 0, }, }; + gchar *name; g_scanner_get_next_token (scanner); /* eat type name */ prop.type_name = g_quark_from_string (scanner->value.v_identifier); @@ -2713,8 +2714,10 @@ gtk_rc_parse_style (GtkRcContext *context, } /* it's important that we do the same canonification as GParamSpecPool here */ - g_strcanon (scanner->value.v_identifier, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); - prop.property_name = g_quark_from_string (scanner->value.v_identifier); + name = g_strdup (scanner->value.v_identifier); + g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); + prop.property_name = g_quark_from_string (name); + g_free (name) token = gtk_rc_parse_assignment (scanner, &prop); if (token == G_TOKEN_NONE) |