[grisbi-cvs] grisbi/src etats_calculs.c,1.135,1.136

Pierre Biava pbiava at users.sourceforge.net
Sun Mar 14 21:57:16 CET 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21665

Modified Files:
	etats_calculs.c 
Log Message:
fixed bug 1003  I hope

Index: etats_calculs.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_calculs.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- etats_calculs.c	14 Feb 2010 17:48:49 -0000	1.135
+++ etats_calculs.c	14 Mar 2010 20:57:14 -0000	1.136
@@ -903,8 +903,13 @@
 gint cherche_string_equivalente_dans_slist ( gchar *string_list,
 					     gchar *string_cmp )
 {
-    return ( strcmp ( string_list,
-		      string_cmp ));
+    if ( ! string_list || strlen ( string_list ) == 0 )
+        return -1;
+
+    if ( ! string_cmp || strlen ( string_cmp ) == 0 )
+        return 1;
+
+    return ( strcmp ( string_list, string_cmp ) );
 }
 /* ************************************************************************************************************** */
 



More information about the cvs mailing list