summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gen/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gen/main.c b/src/gen/main.c
index b610a7e..404c99f 100644
--- a/src/gen/main.c
+++ b/src/gen/main.c
@@ -173,8 +173,9 @@ int main(int argc,
sz = ftell(js);
rewind(js);
- js_src = (char*)malloc(sz);
+ js_src = (char*)malloc(sz + 1);
fread(js_src, 1, sz, js);
+ js_src[sz] = '\0';
fseek(bin, 0L, SEEK_END);
sz = ftell(bin);