[evolution-ews] I#30 - Double values should use dot as decimal separator in XML
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] I#30 - Double values should use dot as decimal separator in XML
- Date: Thu, 10 Jan 2019 10:34:04 +0000 (UTC)
commit d2e1b167129b0dc359ab8ca344215223f2acdd2e
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]