Skip to content

Commit 64de4b6

Browse files
authored
Merge pull request json-c#646 from pascal-cuoq/fix_645
Cast to unsigned char instead of int when calling tolower (Fixes json-c#645)
2 parents 024e835 + 1962ba7 commit 64de4b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json_tokener.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
430430
{
431431
char inf_char = *str;
432432
if (!(tok->flags & JSON_TOKENER_STRICT))
433-
inf_char = tolower((int)*str);
433+
inf_char = tolower((unsigned char)*str);
434434
if (inf_char != _json_inf_str[tok->st_pos])
435435
{
436436
tok->err = json_tokener_error_parse_unexpected;

0 commit comments

Comments
 (0)