[glib/gsettings] don't add '.0' to the end of 'inf' and 'NaN'
- From: Ryan Lortie <ryanl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib/gsettings] don't add '.0' to the end of 'inf' and 'NaN'
- Date: Thu, 3 Sep 2009 13:55:28 +0000 (UTC)
commit e615bc97a96036f7e8cfc1e44d35b7e71858efa8
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Sep 3 09:54:55 2009 -0400
don't add '.0' to the end of 'inf' and 'NaN'
glib/gvariant-printer.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glib/gvariant-printer.c b/glib/gvariant-printer.c
index c73e6aa..249090a 100644
--- a/glib/gvariant-printer.c
+++ b/glib/gvariant-printer.c
@@ -262,7 +262,8 @@ g_variant_print_string (GVariant *value,
g_ascii_dtostr (buffer, sizeof buffer, g_variant_get_double (value));
for (i = 0; buffer[i]; i++)
- if (buffer[i] == '.' || buffer[i] == 'e')
+ if (buffer[i] == '.' || buffer[i] == 'e' ||
+ buffer[i] == 'n' || buffer[i] == 'N')
break;
/* if there is no '.' or 'e' in the float then add one */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]