[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_4-100-g1b692ff

Pierre Biava nobody at users.sourceforge.net
Sun Nov 21 19:53:55 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  1b692ff1fec40d0b78b7e7a267d82ab15fe8c114 (commit)
       via  1bdf8d7548793a121817e64dfc3cee7de5943b00 (commit)
      from  1852dbcb15674089795f8c60d40034486354cae2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1b692ff1fec40d0b78b7e7a267d82ab15fe8c114
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Nov 21 19:50:55 2010 +0100

    Fixed a crash when the number of a check is initialized in the preferences

commit 1bdf8d7548793a121817e64dfc3cee7de5943b00
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Nov 21 16:12:43 2010 +0100

    maximize backup of the features of accounts

-----------------------------------------------------------------------

Changes:
diff --git a/src/gsb_data_payment.c b/src/gsb_data_payment.c
index 1229fa4..da06c10 100644
--- a/src/gsb_data_payment.c
+++ b/src/gsb_data_payment.c
@@ -863,23 +863,26 @@ gboolean gsb_data_payment_set_last_number_from_int ( gint payment_number,
 					    gint last_number )
 {
     struct_payment *payment;
-    const gchar *old_number;
+    const gchar *old_number = NULL;
     gchar *new_number;
     gchar *prefix = NULL;
     gint i = 0;
 
     payment = gsb_data_payment_get_structure ( payment_number );
 
-    if (!payment)
-	return FALSE;
+    if ( !payment )
+        return FALSE;
 
     old_number = gsb_data_payment_get_last_number ( payment_number );
-    while ( old_number[i] == '0' )
+    if ( old_number )
     {
-        i++;
+        while ( old_number[i] == '0' )
+        {
+            i++;
+        }
+        if ( i > 0 )
+            prefix = g_strndup ( old_number, i );
     }
-    if ( i > 0 )
-        prefix = g_strndup ( old_number, i );
 
     new_number = utils_str_itoa ( last_number );
     if ( prefix && strlen ( prefix ) )
diff --git a/src/gsb_file_save.c b/src/gsb_file_save.c
index c19c215..94e11f4 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -1165,6 +1165,7 @@ gulong gsb_file_save_account_part ( gulong iterator,
 	    my_safe_null_str(form_columns_width),
         gsb_data_account_get_bet_use_budget ( account_number ) );
 
+    if ( gsb_data_account_get_bet_use_budget ( account_number ) > 0 )
     switch ( kind )
     {
         case GSB_TYPE_LIABILITIES:
@@ -1188,7 +1189,7 @@ gulong gsb_file_save_account_part ( gulong iterator,
             g_free ( bet_str );
             break;
         case GSB_TYPE_ASSET:
-            new_string = g_strconcat ( new_string, " />\n",NULL );
+            new_string = g_strconcat ( new_string, " />\n", NULL );
             break;
         default:
             bet_str = g_markup_printf_escaped ( "\t\tBet_start_date=\"%s\"\n"
@@ -1214,6 +1215,8 @@ gulong gsb_file_save_account_part ( gulong iterator,
             g_free ( bet_str );
             break;
     }
+    else
+        new_string = g_strconcat ( new_string, " />\n", NULL );
 
 	g_free (sort_list);
 	g_free (sort_kind_column);


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list