diff options
author | John Wiegley <johnw@newartisans.com> | 2012-10-15 09:45:23 -0700 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-10-15 09:45:23 -0700 |
commit | 385cbd25b9905b16a4c7723bb4e5a5813e84aab0 (patch) | |
tree | 3ffa12d9ae72f422281dcab6f9b26f60c80747ea /src/csv.cc | |
parent | c2cc47bc986fbceedf79af55eb87b46fa99fe497 (diff) | |
parent | 937c9c7bd1a96ca24ecae71695f12bd25641c14c (diff) | |
download | fork-ledger-385cbd25b9905b16a4c7723bb4e5a5813e84aab0.tar.gz fork-ledger-385cbd25b9905b16a4c7723bb4e5a5813e84aab0.tar.bz2 fork-ledger-385cbd25b9905b16a4c7723bb4e5a5813e84aab0.zip |
Merge pull request #89 from kljohann/bugs.convert
fix several ledger convert bugs
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: |