From ec5397f9b0fba888a2643a8a9c0238c5f1f55980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Zanelli?= Date: Thu, 7 Jul 2016 10:23:00 +0200 Subject: [PATCH] keyfile: return 0 when the parsed double value is invalid As specified in the g_key_file_get_double documentation. https://bugzilla.gnome.org/show_bug.cgi?id=768504 --- glib/gkeyfile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 460d4830b..7fb4d7f85 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -4345,6 +4345,8 @@ g_key_file_parse_value_as_double (GKeyFile *key_file, "as a float number."), value_utf8); g_free (value_utf8); + + double_value = 0; } return double_value;