NETWORKING: Fix compiler warning about always false comparison

warning: comparison is always false due to limited range of data type [-Wtype-limits]

s is Common::String. s[i] is thus a "char". If char is signed 8bit then the comparison will indeed always be false.
This commit is contained in:
Thanasis Antoniou 2020-02-01 18:22:38 +02:00
parent a95f18769d
commit ad046b1589

View File

@ -56,7 +56,7 @@ Common::String encodeHtmlEntities(Common::String s) {
result += ">";
else if (s[i] == '&')
result += "&";
else if (s[i] > (byte)0x7F)
else if ((byte)s[i] > (byte)0x7F)
result += Common::String::format("&#%d;", (int)s[i]);
else result += s[i];
return result;