diff options
Diffstat (limited to 'src/string.cc')
| -rw-r--r-- | src/string.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string.cc b/src/string.cc index 22d4e609..693cf7d5 100644 --- a/src/string.cc +++ b/src/string.cc @@ -44,6 +44,9 @@ Vector<String> split(StringView str, char separator, char escape) Vector<StringView> split(StringView str, char separator) { Vector<StringView> res; + if (str.empty()) + return res; + auto beg = str.begin(); for (auto it = beg; it != str.end(); ++it) { |
