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,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;
}