From 4b92f0895a4264b7ca3d03410e95e4791559cffd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 9 Sep 2015 16:52:11 -0400 Subject: [PATCH] builder: Minor tweak --- gtk/gtkbuilder.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 1bf770f760..1941aac820 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -2274,10 +2274,16 @@ _gtk_builder_boolean_from_string (const gchar *string, goto error; else if (string[1] == '\0') { - gchar c = g_ascii_tolower (string[0]); - if (c == 'y' || c == 't' || c == '1') + gchar c; + + c = string[0]; + if (c == '1' || + c == 'y' || c == 't' || + c == 'Y' || c == 'T') *value = TRUE; - else if (c == 'n' || c == 'f' || c == '0') + else if (c == '0' || + c == 'n' || c == 'f' || + c == 'N' || c == 'F') *value = FALSE; else goto error;