diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-12-03 07:34:13 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-12-03 07:34:13 +0000 |
commit | ea18007633b31901f2ae275cc0576c3f7ce99fc9 (patch) | |
tree | 968d69ac8c8bb4a5d977530d2dc9886bdccbf1a4 /src/csvreader.cpp | |
parent | f0b91dd739ede9b0ec56fc4639acb94137eea76c (diff) | |
download | libbu++-ea18007633b31901f2ae275cc0576c3f7ce99fc9.tar.gz libbu++-ea18007633b31901f2ae275cc0576c3f7ce99fc9.tar.bz2 libbu++-ea18007633b31901f2ae275cc0576c3f7ce99fc9.tar.xz libbu++-ea18007633b31901f2ae275cc0576c3f7ce99fc9.zip |
Fixed a bug in the csv reader, it would drop the last field in a line if the
comma was the last character. It's best to preserve every field, even if it's
completely blank.
Diffstat (limited to 'src/csvreader.cpp')
-rw-r--r-- | src/csvreader.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/csvreader.cpp b/src/csvreader.cpp index 08803e7..f3133c2 100644 --- a/src/csvreader.cpp +++ b/src/csvreader.cpp | |||
@@ -56,7 +56,10 @@ Bu::StrArray Bu::CsvReader::readLine() | |||
56 | { | 56 | { |
57 | i++; | 57 | i++; |
58 | if( !i ) | 58 | if( !i ) |
59 | { | ||
60 | aVals.append(""); | ||
59 | break; | 61 | break; |
62 | } | ||
60 | aVals.append( sDecode( i ) ); | 63 | aVals.append( sDecode( i ) ); |
61 | } | 64 | } |
62 | else | 65 | else |