Make sure UDQ quote_split does not append empty string

This commit is contained in:
Joakim Hove
2020-06-30 09:37:42 +02:00
parent 7fce7a2c9c
commit 8ad0c99c1d

View File

@@ -43,7 +43,8 @@ std::vector<std::string> quote_split(const std::string& item) {
while (true) {
auto quote_pos1 = item.find(quote_char, offset);
if (quote_pos1 == std::string::npos) {
items.push_back(item.substr(offset));
if (offset < item.size())
items.push_back(item.substr(offset));
break;
}