diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-09-20 11:47:20 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-09-20 11:47:20 +0100 |
| commit | ca2043d9f20018ebcae363dce9eedc8aff4eeb99 (patch) | |
| tree | 462c549ed709d91d3dc6ba4d3b91366e46f67a7f /src/string.cc | |
| parent | 2b4b73ae8e450c995ccccc93fcf6d2b73ea18862 (diff) | |
Fix unescape implementation
Diffstat (limited to 'src/string.cc')
| -rw-r--r-- | src/string.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |
