Commit 6ac10428 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed control character enconding in jencode

parent 30c0a4cf
......@@ -29,8 +29,8 @@ char *jescape(char *s)
case '\t':
fputs("\\t", stream); break;
if (*s <= 0x1f)
fprintf(stream, "\\u%04x", *s);
if (*s <= 0x1f && *s >= 0)
fprintf(stream, "\\u%04hhx", *s);
fputc(*s, stream);
Supports Markdown
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