]> saetta.ns0.it Git - libgtkform/commitdiff
Other bugfix on field fload validity checking.
authorAndrea Zagli <azagli@libero.it>
Sun, 2 Oct 2011 09:44:28 +0000 (11:44 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 2 Oct 2011 09:55:39 +0000 (11:55 +0200)
libgtkform/fieldfloat.c

index b42a1909910eb12a59b0414f07bea3f06f84ad92..a09f011057a1a46f77e65cb2c347b6ed304a79e1 100644 (file)
@@ -374,19 +374,20 @@ gtk_form_field_float_is_valid (GtkFormField *field)
                                {
                                        if (str_comma == NULL)
                                                {
-                                                       str_format = g_strdup ("%%06d");
+                                                       str_format = g_strdup ("%06d");
                                                }
                                        else
                                                {
                                                        if (strlen (str_comma) < 6)
                                                                {
-                                                                       str_format = g_strdup_printf ("%%0%dd", 6 - strlen (str_comma) - 1);
+                                                                       str_format = g_strdup_printf ("%%0%dd", 6 - (strlen (str_comma) - 1));
                                                                }
                                                        else
                                                                {
                                                                        if (strlen (str_comma) > 6)
                                                                                {
                                                                                        str_value = g_strndup (str_value, strlen (str_value) - strlen (str_comma) + 7);
+                                                                                       dbl_value = g_strtod (str_value, NULL);
                                                                                }
                                                                        str_format = NULL;
                                                                }