Skip to content

Commit

Permalink
Fix parsing of empty rows
Browse files Browse the repository at this point in the history
Signed-off-by: Osyotr <[email protected]>
  • Loading branch information
Osyotr authored May 25, 2024
1 parent ab59bd5 commit cbe49e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/just_gtfs/just_gtfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cbe49e4

Please sign in to comment.