summaryrefslogtreecommitdiff
path: root/src/gen/main.c
diff options
context:
space:
mode:
authorspv420 <unomilliono@gmail.com>2022-04-24 09:37:33 -0400
committerspv420 <unomilliono@gmail.com>2022-04-24 09:37:33 -0400
commit4615ba8d10dddbbef72a160d075ad974ae9431a5 (patch)
tree9f39022fabcd86c1645cdae41eaf17e6014fc439 /src/gen/main.c
parentc147222514a38ec2f00d36573a1ff7a5450836c6 (diff)
stop seggyfaulty
Diffstat (limited to 'src/gen/main.c')
-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);