diff --git a/src/string.cc b/src/string.cc index 45264898..357b4f2f 100644 --- a/src/string.cc +++ b/src/string.cc @@ -91,10 +91,13 @@ String unescape(StringView str, StringView characters, char escape) { res += StringView{it, next+1}; res.back() = *(next+1); + it = next + 2; } else + { res += StringView{it, next == end ? next : next + 1}; - it = next == end ? next : next + 1; + it = next == end ? next : next + 1; + } } return res; }