From 54ddc589e3d803a4ceddf6b5a784ff85a94421ec Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 1 Mar 2010 23:35:57 +0000 Subject: The CSV Reader now handles multiple comma characters in sequence without spaces correctly. --- src/csvreader.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/csvreader.cpp b/src/csvreader.cpp index 1f623fa..b045773 100644 --- a/src/csvreader.cpp +++ b/src/csvreader.cpp @@ -43,14 +43,22 @@ Bu::StrArray Bu::CsvReader::readLine() Bu::FString sLine = sIn.readLine(); - for( Bu::FString::iterator i = sLine.begin(); i; i++ ) + Bu::FString::iterator i = sLine.begin(); + + aVals.append( sDecode( i ) ); + + while( i ) { if( *i == ',' ) { + i++; + aVals.append( sDecode( i ) ); } else { - aVals.append( sDecode( i ) ); + // Blanks and stuff? + sio << "Out of bound: '" << *i << "'" << sio.nl; + i++; } } -- cgit v1.2.3