From e98148f65879a95d7093d52baa310a72b435a81a Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 2 Oct 2011 11:44:28 +0200 Subject: [PATCH] Other bugfix on field fload validity checking. --- libgtkform/fieldfloat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.49.0