]> git.0d.be Git - empathy.git/commitdiff
Use g_ascii_strtod instead of sscanf. (Jonny Lamb)
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 17 Oct 2008 12:47:11 +0000 (12:47 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 17 Oct 2008 12:47:11 +0000 (12:47 +0000)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=1619

src/empathy-import-dialog.c

index 6f3618483f6e3d0645245271b2e6e8c62931593b..e726e1e3c57287b108de21f00edb2d6f527c8db4 100644 (file)
@@ -248,13 +248,13 @@ import_dialog_pidgin_parse_setting (AccountData *data,
 
   if (!tp_strdiff (type, "bool"))
     {
 
   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"))
     {
       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);
     }
       value = tp_g_value_slice_new (G_TYPE_INT);
       g_value_set_int (value, i);
     }