[glib/glib-2-48] keyfile: return 0 when the parsed double value is invalid



commit 9cd2772df0ffbdaf04274c81ed20128ab5ee56e6
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 4b25fd7..29e8f0a 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -4315,6 +4315,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]