Fix error/warning on Arm due to unsigned char. (#10572)

This commit is contained in:
Yossi Gottlieb 2022-04-12 18:55:11 +03:00 committed by GitHub
parent 6b403f56a5
commit bd8da0ca29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,7 +390,7 @@ sds escapeJsonString(sds s, const char *p, size_t len) {
case '\t': s = sdscatlen(s,"\\t",2); break;
case '\b': s = sdscatlen(s,"\\b",2); break;
default:
s = sdscatprintf(s,(*p >= 0 && *p <= 0x1f) ? "\\u%04x" : "%c",*p);
s = sdscatprintf(s,*(unsigned char *)p <= 0x1f ? "\\u%04x" : "%c",*p);
}
p++;
}