From 4615ba8d10dddbbef72a160d075ad974ae9431a5 Mon Sep 17 00:00:00 2001 From: spv420 Date: Sun, 24 Apr 2022 09:37:33 -0400 Subject: stop seggyfaulty --- src/gen/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gen/main.c') 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); -- cgit v1.2.3