diff options
author | Johann Klähn <kljohann@gmail.com> | 2013-01-18 18:26:03 +0100 |
---|---|---|
committer | Johann Klähn <kljohann@gmail.com> | 2013-01-18 18:26:03 +0100 |
commit | b3b11bed3be9c7a6dcd4a4427eb02fa7d92f34ed (patch) | |
tree | cd5008b6a42cd65c9fe668a92e10237fcec335c4 /src/csv.cc | |
parent | 83bd3234d32d7a82d583e4f50f8f90837aa15a93 (diff) | |
parent | 385cbd25b9905b16a4c7723bb4e5a5813e84aab0 (diff) | |
download | fork-ledger-b3b11bed3be9c7a6dcd4a4427eb02fa7d92f34ed.tar.gz fork-ledger-b3b11bed3be9c7a6dcd4a4427eb02fa7d92f34ed.tar.bz2 fork-ledger-b3b11bed3be9c7a6dcd4a4427eb02fa7d92f34ed.zip |
Merge branch 'master' into next
Some commits were on the master branch but not yet on the next branch due to a
pull request to master after those two branches diverged. This merge
ensures that next ⊇ master.
Diffstat (limited to 'src/csv.cc')
-rw-r--r-- | src/csv.cc | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -166,7 +166,7 @@ xact_t * csv_reader::read_xact(bool rich_data) string total; string field; - while (instr.good() && ! instr.eof()) { + while (instr.good() && ! instr.eof() && n < index.size()) { field = read_field(instr); switch (index[n]) { @@ -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: |