empathy r1619 - trunk/src



Author: xclaesse
Date: Fri Oct 17 12:47:11 2008
New Revision: 1619
URL: http://svn.gnome.org/viewvc/empathy?rev=1619&view=rev

Log:
Use g_ascii_strtod instead of sscanf. (Jonny Lamb)

Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

Modified:
   trunk/src/empathy-import-dialog.c

Modified: trunk/src/empathy-import-dialog.c
==============================================================================
--- trunk/src/empathy-import-dialog.c	(original)
+++ trunk/src/empathy-import-dialog.c	Fri Oct 17 12:47:11 2008
@@ -248,13 +248,13 @@
 
   if (!tp_strdiff (type, "bool"))
     {
-      sscanf (content, "%i", &i);
+      i = (gint) g_ascii_strtod (content, NULL);
       value = tp_g_value_slice_new (G_TYPE_BOOLEAN);
       g_value_set_boolean (value, i != 0);
     }
   else if (!tp_strdiff (type, "int"))
     {
-      sscanf (content, "%i", &i);
+      i = (gint) g_ascii_strtod (content, NULL);
       value = tp_g_value_slice_new (G_TYPE_INT);
       g_value_set_int (value, i);
     }



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