diff options
author | Olga Khlopkova <o.khlopkova@corp.mail.ru> | 2020-06-18 13:33:29 +0300 |
---|---|---|
committer | Olga Khlopkova <o.khlopkova@corp.mail.ru> | 2020-06-18 13:33:29 +0300 |
commit | 714e771fba8e69e17d99936535476747781afdca (patch) | |
tree | c621abf1462ab71030db238f13c8bb5680657542 | |
parent | 367e50799e27a373f244a8d89a989577194ff7a0 (diff) |
Fix for quoted empty string.
-rw-r--r-- | include/just_gtfs/just_gtfs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/just_gtfs/just_gtfs.h b/include/just_gtfs/just_gtfs.h index beccea1..c69d9ad 100644 --- a/include/just_gtfs/just_gtfs.h +++ b/include/just_gtfs/just_gtfs.h @@ -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; } |