]> granicus.if.org Git - json-c/commitdiff
Add cast to int on tolower() to fix warnings about array subscripts.
authorEric Haszlakiewicz <erh+git@nimenees.com>
Tue, 5 Dec 2017 04:29:36 +0000 (04:29 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Tue, 5 Dec 2017 04:29:36 +0000 (04:29 +0000)
json_tokener.c

index 416058d405e3358d3b719c4decda996d202a9c35..620468e41c7d2402c7b895b61bc01a760f429c3b 100644 (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;