Compare commits

..

1 commit

Author SHA1 Message Date
Osyotr
cbe49e4924
Fix parsing of empty rows
Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
2024-05-25 11:20:54 +03:00

View file

@ -426,7 +426,7 @@ inline Result CsvParser::read_row(std::map<std::string, std::string> & obj)
if (!getline(csv_stream, row))
return {ResultCode::END_OF_FILE, {}};
if (row == "\r")
if (row.empty() || row == "\r")
return ResultCode::OK;
const std::vector<std::string> fields_values = split_record(row);