Skip to content

Commit

Permalink
Fix for quoted empty string.
Browse files Browse the repository at this point in the history
  • Loading branch information
mesozoic-drones committed Jun 18, 2020
1 parent 367e507 commit 714e771
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/just_gtfs/just_gtfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ inline std::string unquote_text(const std::string & text)
}

if (res.size() > 2 && res.front() == quote && res.back() == quote && (quotes_count - 2) % 2 == 0)
{
return res.substr(1, res.size() - 2);
}

if (res == "\"")
return {};

return res;
}
Expand Down

0 comments on commit 714e771

Please sign in to comment.