From 1f2fe401f1e98a9a1d3122b79593e12a668bfb43 Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Sat, 13 Oct 2012 19:38:42 +0200 Subject: ignore (some) empty field when converting csv This fixes bug #733 and bug #734. --- src/csv.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/csv.cc b/src/csv.cc index 71b6516a..aca69307 100644 --- a/src/csv.cc +++ b/src/csv.cc @@ -175,7 +175,8 @@ xact_t * csv_reader::read_xact(bool rich_data) break; case FIELD_DATE_AUX: - xact->_date_aux = parse_date(field); + if (! field.empty()) + xact->_date_aux = parse_date(field); break; case FIELD_CODE: @@ -224,7 +225,8 @@ xact_t * csv_reader::read_xact(bool rich_data) break; case FIELD_NOTE: - xact->note = field; + if (! field.empty()) + xact->note = field; break; case FIELD_UNKNOWN: -- cgit v1.2.3