[grisbi-cvs] grisbi/src utils_editables.c,1.27,1.28
Pierre Biava
pbiava at users.sourceforge.net
Fri Feb 13 21:48:10 CET 2009
- Previous message: [grisbi-cvs] grisbi/src gsb_file_load.c, 1.148, 1.149 gsb_form.c, 1.107, 1.108 gsb_reconcile.c, 1.31, 1.32 gtk_combofix.c, 1.56, 1.57 traitement_variables.c, 1.164, 1.165
- Next message: [grisbi-cvs] grisbi/src gsb_form_widget.c,1.28,1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19698
Modified Files:
utils_editables.c
Log Message:
To avoid a crash at the entrance to a 0 in an gtk_entry
Index: utils_editables.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_editables.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- utils_editables.c 2 Sep 2008 17:02:05 -0000 1.27
+++ utils_editables.c 13 Feb 2009 20:48:08 -0000 1.28
@@ -137,12 +137,12 @@
/**
- * calcule le total du contenu de l'entrée donnée en argument
+ * calcule le total du contenu de l'entrée donnée en argument
* accepte les + et les -
*
- * \param entry entrée d'un montant
+ * \param entry entrée d'un montant
*
- * \return gsb_real total de ce qui est dans l'entrée
+ * \return gsb_real total de ce qui est dans l'entrée
*/
gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry )
{
@@ -151,7 +151,11 @@
gsb_real total = null_real;
string = my_strdup (gtk_entry_get_text ( GTK_ENTRY (entry)));
- pointeur = string + strlen (string);
+ /* modified by pbiava 02/13/2009 To avoid a crash at the entrance to a 0 */
+ if (string && strlen (string))
+ pointeur = string + strlen (string);
+ else
+ return total;
while ( pointeur != string )
{
- Previous message: [grisbi-cvs] grisbi/src gsb_file_load.c, 1.148, 1.149 gsb_form.c, 1.107, 1.108 gsb_reconcile.c, 1.31, 1.32 gtk_combofix.c, 1.56, 1.57 traitement_variables.c, 1.164, 1.165
- Next message: [grisbi-cvs] grisbi/src gsb_form_widget.c,1.28,1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list