1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Fix: Handle bytes >= 0x80 correctly

This commit is contained in:
Philipp Schafft 2020-10-07 20:19:52 +00:00
parent 61d68a13b4
commit 02e9c048d0

View File

@ -290,7 +290,7 @@ static void write_string(json_renderer_t *renderer, const char *string, unsigned
return;
}
if (*string < 0x20) {
if (((unsigned char)*string) < 0x20) {
char buf[7];
snprintf(buf, sizeof(buf), "\\u%.4x", (unsigned int)*string);
write_raw(renderer, buf, 0);