Closed jpdup closed 3 months ago
Do you have the original CSV that failed, your edits make no sense and in fact your changes break the parser because pos++ is a postfix operator meaning (see failed unit test):
while (pos < len && ch != this._fieldDelimiter)
{
sb.Append(ch);
ch = line[pos++]; // peek next char
}
I'm guessing the bug was on line 456 since this one does not check if pos < len. So I'm going to push a simpler fix for you to try that changes only that line. This bug will only happen on malformed csv that has trailing commas at the end of the line.
See fix posted in version 2.1.0.20.
I hit runtime crash will doing CSV import, "index out of bound", This insure to say in bounds