Skip to content

Commit

Permalink
Fix grouping of instructions in ASM mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed May 18, 2024
1 parent 57a7fd1 commit 94ef8b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/explorer/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ for (const func of state.asm.functions) {
};

for (const inst of func.instructions) {
disasmBuffer.push(
`${renderAddress(inst.address)} ${renderBytes(inst.bytes)} ${renderInst(inst.mnemonic, inst.operands)}`,
);
if (lastOffset !== inst.wasm_offset) {
addCurrentBlock(lastOffset);
currentBlock = createDivForCode();
lastOffset = inst.wasm_offset;
}
disasmBuffer.push(
`${renderAddress(inst.address)} ${renderBytes(inst.bytes)} ${renderInst(inst.mnemonic, inst.operands)}`,
);
}
addCurrentBlock(lastOffset);

Expand Down

0 comments on commit 94ef8b5

Please sign in to comment.