Fix "array subscript is of type 'char'"

parent b19fed3c
Pipeline #43579 canceled with stages
in 46 seconds
......@@ -347,11 +347,12 @@ save_command_line(int argc, char *argv[]) {
*dst++ = ' ';
while (*src != '\0' && dst < eob) {
if (isalnum(*src) || *src == ',' || *src == '-' ||
*src == '_' || *src == '.' || *src == '/')
if (isalnum(*(unsigned char *)src) || *src == ',' ||
*src == '-' || *src == '_' || *src == '.' ||
*src == '/')
{
*dst++ = *src++;
} else if (isprint(*src)) {
} else if (isprint(*(unsigned char *)src)) {
if (dst + 2 >= eob) {
goto add_ellipsis;
}
......
......@@ -1287,7 +1287,7 @@ parse_duration(cfg_parser_t *pctx, cfg_obj_t **ret) {
duration.unlimited = false;
if (toupper(TOKEN_STRING(pctx)[0]) == 'P') {
if (toupper((unsigned char)TOKEN_STRING(pctx)[0]) == 'P') {
result = duration_fromtext(&pctx->token.value.as_textregion,
&duration);
duration.iso8601 = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment