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