[Gnucash-changes] (gnc_imap_add_account_bayes): Skip the case when
a token is the empty
Christian Stimming
cstim at cvs.gnucash.org
Sat May 8 05:32:39 EDT 2004
Log Message:
-----------
(gnc_imap_add_account_bayes): Skip the case when a token is the empty string.
2004-05-08 Christian Stimming <stimming at tuhh.de>
* src/import-export/import-match-map.c
(gnc_imap_add_account_bayes): Skip the case when a token is the
empty string. This caused many warnings about a NULL kvp_frame
lookup.
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/import-export:
import-match-map.c
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1809
retrieving revision 1.1810
diff -LChangeLog -LChangeLog -u -r1.1809 -r1.1810
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,10 @@
+2004-05-08 Christian Stimming <stimming at tuhh.de>
+
+ * src/import-export/import-match-map.c
+ (gnc_imap_add_account_bayes): Skip the case when a token is the
+ empty string. This caused many warnings about a NULL kvp_frame
+ lookup.
+
2004-05-07 David Hampton <hampton at employees.org>
* src/engine/gnc-commodity.c: Added quote sources for Indian
Index: import-match-map.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-match-map.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/import-export/import-match-map.c -Lsrc/import-export/import-match-map.c -u -r1.6 -r1.7
--- src/import-export/import-match-map.c
+++ src/import-export/import-match-map.c
@@ -482,6 +482,13 @@
for(current_token = g_list_first(tokens); current_token;
current_token = current_token->next)
{
+ /* Jump to next iteration if the pointer is not valid or if the
+ string is empty. In HBCI import we almost always get an empty
+ string, which doesn't work in the kvp loopkup later. So we
+ skip this case here. */
+ if (!current_token->data || (*((char*)current_token->data) == '\0'))
+ continue;
+
/* start off with no tokens for this account */
token_count = 0;
More information about the Gnucash-changes
mailing list