| ... | ... | @@ -2218,6 +2218,9 @@ pub fn flushModule(wasm: *Wasm, comp: *Compilation, prog_node: *std.Progress.Nod |
| 2218 | 2218 | // We write the magic bytes at the end so they will only be written |
| 2219 | 2219 | // if everything succeeded as expected. So populate with 0's for now. |
| 2220 | 2220 | try binary_writer.writeAll(&[_]u8{0} ** 8); |
| 2221 | // (Re)set file pointer to 0 |
| 2222 | try wasm.base.file.?.setEndPos(0); |
| 2223 | try wasm.base.file.?.seekTo(0); |
| 2221 | 2224 | |
| 2222 | 2225 | // Type section |
| 2223 | 2226 | if (wasm.func_types.items.len != 0) { |