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

Fixed control character enconding in jencode

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