From: Andrea Zagli Date: Sun, 2 Oct 2011 09:44:28 +0000 (+0200) Subject: Other bugfix on field fload validity checking. X-Git-Tag: 0.4.0~3 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=e98148f65879a95d7093d52baa310a72b435a81a;p=libgtkform Other bugfix on field fload validity checking. --- diff --git a/libgtkform/fieldfloat.c b/libgtkform/fieldfloat.c index b42a190..a09f011 100644 --- a/libgtkform/fieldfloat.c +++ b/libgtkform/fieldfloat.c @@ -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; }