Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/just_gtfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlga Khlopkova <o.khlopkova@corp.mail.ru>2020-06-18 13:33:29 +0300
committerOlga Khlopkova <o.khlopkova@corp.mail.ru>2020-06-18 13:33:29 +0300
commit714e771fba8e69e17d99936535476747781afdca (patch)
treec621abf1462ab71030db238f13c8bb5680657542
parent367e50799e27a373f244a8d89a989577194ff7a0 (diff)
Fix for quoted empty string.
-rw-r--r--include/just_gtfs/just_gtfs.h5
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;
}