diff options
Diffstat (limited to 'project2/fileRows.cpp')
-rw-r--r-- | project2/fileRows.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/project2/fileRows.cpp b/project2/fileRows.cpp index 955767c..d9c26bc 100644 --- a/project2/fileRows.cpp +++ b/project2/fileRows.cpp @@ -51,10 +51,11 @@ _FileRows::execute() const if (prevWasQuote) { tok += c; prevWasQuote = false; + inQuotes = !inQuotes; } else { + prevWasQuote = inQuotes; inQuotes = !inQuotes; - prevWasQuote = true; } } else if ((!inQuotes) && (c == fieldSep)) { @@ -82,7 +83,7 @@ _FileRows::execute() const curCol++; } } - if (!mkCols) { + if (!mkCols && !values.empty()) { while (values.size() < columns.size()) { values.push_back(ValPtr(new Glib::ustring())); curCol++; |