Skip to content
Myr

Cast char to unsigned char before passing to isspace (#3574)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Klausner · committed by GitHub · parent 42d4035 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/main.c+1 added-1 removed
435 unmodified lines
436 char* end = NULL;437 errno = 0;438 long indent = strtol(argv[i+1], &end, 10);439 if (errno || indent < -1 || indent > 7 ||440 isspace(*argv[i+1]) || end == argv[i+1] || *end) {440 isspace((unsigned char)*argv[i+1]) || end == argv[i+1] || *end) {441 fprintf(stderr, "jq: --indent takes a number between -1 and 7\n");442 die();443 }444 dumpopts &= ~(JV_PRINT_TAB | JV_PRINT_INDENT_FLAGS(7));
286 unmodified lines