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:
parent
61d68a13b4
commit
02e9c048d0
@ -290,7 +290,7 @@ static void write_string(json_renderer_t *renderer, const char *string, unsigned
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*string < 0x20) {
|
if (((unsigned char)*string) < 0x20) {
|
||||||
char buf[7];
|
char buf[7];
|
||||||
snprintf(buf, sizeof(buf), "\\u%.4x", (unsigned int)*string);
|
snprintf(buf, sizeof(buf), "\\u%.4x", (unsigned int)*string);
|
||||||
write_raw(renderer, buf, 0);
|
write_raw(renderer, buf, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user