LEB128-encode addresses in data section

This commit is contained in:
2026-03-14 18:35:33 +00:00
parent 714973f052
commit f4433ce3a3

2
asm.js
View File

@@ -984,7 +984,7 @@ export class Assembler {
return [
...(loc.mem == 0 ? [ 0 ] : [ 2, loc.mem ]),
opcodes["i32.const"],
loc.addr,
...this.leb128(loc.addr),
opcodes["end"],
data.length,
...data,