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
This commit is contained in:
Aurélien Zanelli 2016-07-07 10:23:00 +02:00 committed by Matthias Clasen
parent 3560faadd1
commit ec5397f9b0

View File

@ -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;