Fix unescape implementation

This commit is contained in:
Maxime Coste 2015-09-20 11:47:20 +01:00
parent 2b4b73ae8e
commit ca2043d9f2

View File

@ -91,11 +91,14 @@ String unescape(StringView str, StringView characters, char escape)
{ {
res += StringView{it, next+1}; res += StringView{it, next+1};
res.back() = *(next+1); res.back() = *(next+1);
it = next + 2;
} }
else else
{
res += StringView{it, next == end ? next : next + 1}; res += StringView{it, next == end ? next : next + 1};
it = next == end ? next : next + 1; it = next == end ? next : next + 1;
} }
}
return res; return res;
} }