[glib] keyfile: return 0 when the parsed double value is invalid
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] keyfile: return 0 when the parsed double value is invalid
- Date: Sun, 17 Jul 2016 00:51:25 +0000 (UTC)
commit ec5397f9b0fba888a2643a8a9c0238c5f1f55980
Author: Aurélien Zanelli <aurelien zanelli parrot com>
Date: Thu Jul 7 10:23:00 2016 +0200
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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 460d483..7fb4d7f 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]