Add cast to int on tolower() to fix warnings about array subscripts.

This commit is contained in:
Eric Haszlakiewicz
2017-12-05 04:29:36 +00:00
parent aedd36ac8b
commit 0e7ec2ffcd

View File

@@ -403,7 +403,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
{
char inf_char = *str;
if (!(tok->flags & JSON_TOKENER_STRICT))
inf_char = tolower(*str);
inf_char = tolower((int)*str);
if (inf_char != _json_inf_str[tok->st_pos])
{
tok->err = json_tokener_error_parse_unexpected;