From 00a76112248652e2fdadeb1336c438d8f8b11050 Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Fri, 24 Mar 2017 15:12:10 -0700 Subject: [snapshot] Fixed bytecode array bug Since we storing unint32_t instead of uint8_t, there's bug that we are creating an array that's 4 times the needed size with a bunch of 0s, this patch fixes this issue Signed-off-by: Jimmy Huang --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index ce3c6d8..22365d2 100644 --- a/src/main.c +++ b/src/main.c @@ -44,7 +44,7 @@ const uint32_t snapshot_bytecode[] = { #include "zjs_snapshot_gen.h" }; -const size_t snapshot_len = sizeof(snapshot_bytecode) / sizeof(uint32_t); +const size_t snapshot_len = sizeof(snapshot_bytecode); #else const char script_jscode[] = { #include "zjs_script_gen.h" -- cgit v1.2.3