summaryrefslogtreecommitdiff
path: root/src/csv.cc
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2012-10-13 20:03:44 +0200
committerJohann Klähn <kljohann@gmail.com>2012-10-13 20:04:10 +0200
commit937c9c7bd1a96ca24ecae71695f12bd25641c14c (patch)
tree3ffa12d9ae72f422281dcab6f9b26f60c80747ea /src/csv.cc
parent27d9d770d3f6d40af4934da1dcf0306daf7678dd (diff)
downloadfork-ledger-937c9c7bd1a96ca24ecae71695f12bd25641c14c.tar.gz
fork-ledger-937c9c7bd1a96ca24ecae71695f12bd25641c14c.tar.bz2
fork-ledger-937c9c7bd1a96ca24ecae71695f12bd25641c14c.zip
ignore extra fields when converting csv files
This fixes bug #736.
Diffstat (limited to 'src/csv.cc')
-rw-r--r--src/csv.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/csv.cc b/src/csv.cc
index aca69307..4992372a 100644
--- a/src/csv.cc
+++ b/src/csv.cc
@@ -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]) {