diff options
-rw-r--r-- | src/csv.cc | 2 | ||||
-rw-r--r-- | test/regress/68917252.dat | 2 | ||||
-rw-r--r-- | test/regress/68917252.test | 5 |
3 files changed, 8 insertions, 1 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]) { diff --git a/test/regress/68917252.dat b/test/regress/68917252.dat new file mode 100644 index 00000000..8857f741 --- /dev/null +++ b/test/regress/68917252.dat @@ -0,0 +1,2 @@ +date,amount, +12/12/2011,10,test,extra,fields diff --git a/test/regress/68917252.test b/test/regress/68917252.test new file mode 100644 index 00000000..52fde1d9 --- /dev/null +++ b/test/regress/68917252.test @@ -0,0 +1,5 @@ +test -f /dev/null --input-date-format "%m/%d/%Y" convert test/regress/68917252.dat +2011/12/12 * + Expenses:Unknown 10 + Equity:Unknown +end test |