Skip to content

Commit 20e6861

Browse files
authored
Fix parsing of empty rows
1 parent 65cab1b commit 20e6861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/just_gtfs/just_gtfs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ inline Result CsvParser::read_row(std::map<std::string, std::string> & obj)
426426
if (!getline(csv_stream, row))
427427
return {ResultCode::END_OF_FILE, {}};
428428

429-
if (row == "\r")
429+
if (row.empty() || row == "\r")
430430
return ResultCode::OK;
431431

432432
const std::vector<std::string> fields_values = split_record(row);

0 commit comments

Comments
 (0)