[evolution-ews/gnome-3-30] I#30 - Double values should use dot as decimal separator in XML



commit e7fad8c200bb5889605dd8932d09bf0a1eb1a44a
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jan 10 11:33:55 2019 +0100

    I#30 - Double values should use dot as decimal separator in XML
    
    Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/30

 src/server/e-soap-message.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/server/e-soap-message.c b/src/server/e-soap-message.c
index 58f63941..6720f5bf 100644
--- a/src/server/e-soap-message.c
+++ b/src/server/e-soap-message.c
@@ -828,13 +828,12 @@ void
 e_soap_message_write_double (ESoapMessage *msg,
                              gdouble d)
 {
-       gchar *string;
+       gchar buffer[G_ASCII_DTOSTR_BUF_SIZE + 1];
 
        g_return_if_fail (E_IS_SOAP_MESSAGE (msg));
 
-       string = g_strdup_printf ("%f", d);
-       e_soap_message_write_string (msg, string);
-       g_free (string);
+       g_ascii_dtostr (buffer, sizeof (buffer), d);
+       e_soap_message_write_string (msg, buffer);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]