[MODS/IR]: Fix a bug in fix_branches_for_block

This commit is contained in:
luccie 2025-08-10 22:52:04 +02:00
parent a1ab2659a3
commit d8642bfe0a
3 changed files with 10 additions and 11 deletions

View file

@ -26,8 +26,8 @@ fn init_mods() void {
var global_runtime = mods.GlobalRuntime.init(allocator);
defer global_runtime.deinit();
const file = std.fs.cwd().openFile("assets/mods/core.wasm", .{}) catch @panic("Couldn't open assets/mods/core.wasm");
// const file = std.fs.cwd().openFile("./test.wasm", .{}) catch @panic("Couldn't open test.wasm");
// const file = std.fs.cwd().openFile("assets/mods/core.wasm", .{}) catch @panic("Couldn't open assets/mods/core.wasm");
const file = std.fs.cwd().openFile("./test.wasm", .{}) catch @panic("Couldn't open test.wasm");
const all = file.readToEndAlloc(allocator, 1_000_000) catch @panic("Unable to read the file"); // 1 MB
defer allocator.free(all);
var parser = mods.Parser.init(allocator, all) catch @panic("Failed to init parser");