this shouldn't work...
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 19 Jul 2021 23:48:47 +0000 (18:48 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Mon, 19 Jul 2021 23:48:47 +0000 (18:48 -0500)
src/onyxwasm_type_table.c

index 1343f02cc7f321f045ad8b2e94a04846c2d925d3..86b229590c0a9697ef6fc5fc65963ac29dc72228 100644 (file)
@@ -10,7 +10,7 @@ u64 build_type_table(OnyxWasmModule* module) {
 #define PATCH (bh_arr_push(base_patch_locations, table_buffer.length))
 
     // This is the data behind the "type_table" slice in type_info.onyx
-    u32 type_count = bh_arr_length(type_map.entries) + 1;
+    u32 type_count = bh_arr_length(type_map.entries) + 2;
     u64* table_info = bh_alloc_array(global_heap_allocator, u64, type_count + 4); // HACK
 
     bh_buffer table_buffer;