GnuCash
Contact   Instructions
Bug 796982 - Import Bills & Invoices: change in un_escape() routine causes description and notes fields to be mangled
Summary: Import Bills & Invoices: change in un_escape() routine causes description and...
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - CSV (show other bugs)
Version: git-maint
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-18 15:13 EST by Rob Laan
Modified: 2018-12-19 00:33 EST (History)
3 users (show)

See Also:


Attachments

Description Rob Laan 2018-12-18 15:13:26 EST
A change in the un_escape routine in file dialog-bi-import.c causes an issue in  the import of fields Description and Notes.

I.e. a description of "Materials" in the import file is changed to "MMMMMMMMM" by the un_escape routine.

It seems an occurrence of *str was not replaced by *tmpstr in the update.
Comment 1 John Ralls 2018-12-18 16:19:03 EST
What line in dialog-bi-import.c are you referring to?
Comment 2 Rob Laan 2018-12-18 16:41:41 EST
Line 897, in static char * un_escape(char *str)

*str is never increased, so stays on the first char; I assume this should be *tmpstr.

888         {
889             tmpstr++;
890             if(*tmpstr == quote)
891             {
892                 newStr[n] = quote;
893             }
894         }
895         else
896         {
897             newStr[n] = *str;
898         }
899             tmpstr++;
900             n++;
Comment 3 John Ralls 2018-12-19 00:33:34 EST
Ah, good catch. Thanks, and thanks for helping to test maint.

Note You need to log in before you can comment on or make changes to this bug.