浏览代码

Last -Wc++11-narrowing fix for clang 6.0

Was meant to be in b29b35c but forgot to amend it.
Fixes #17944.
Rémi Verschelde 7 年之前
父节点
当前提交
0b180a0732
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/ustring.cpp

+ 1 - 1
core/ustring.cpp

@@ -3303,7 +3303,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;
 				}