improves portability with some compilers

This commit is contained in:
Ariel Manzur 2018-01-18 19:10:07 -03:00
parent 7369b0075e
commit e2b50e1abb
2 changed files with 8 additions and 8 deletions

View file

@ -3167,7 +3167,7 @@ String String::http_unescape() const {
if ((ord1 >= '0' && ord1 <= '9') || (ord1 >= 'A' && ord1 <= 'Z')) {
CharType ord2 = ord_at(i + 2);
if ((ord2 >= '0' && ord2 <= '9') || (ord2 >= 'A' && ord2 <= 'Z')) {
char bytes[2] = { ord1, ord2 };
char bytes[2] = { (char)ord1, (char)ord2 };
res += (char)strtol(bytes, NULL, 16);
i += 2;
}