Fix a sign-compare compiler warning

This commit is contained in:
Jon Siwek 2019-07-11 12:13:48 -07:00
parent 1f329ad541
commit cb292af84d
3 changed files with 6 additions and 2 deletions

View file

@ -1911,7 +1911,7 @@ string json_escape_utf8(const string& val)
// The next bit is based on the table at https://en.wikipedia.org/wiki/UTF-8#Description.
// If next character is 11110xxx, this is a 4-byte UTF-8
int char_size = 0;
unsigned int char_size = 0;
if ( (val[idx] & 0xF8) == 0xF0 ) char_size = 4;
// If next character is 1110xxxx, this is a 3-byte UTF-8