Skip to content

Commit 34fffa7

Browse files
committed
Bugfix in Disassembler.put()
1 parent 08f8738 commit 34fffa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/shared/disassembler.shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class Disassembler {
172172
}
173173

174174
put(instruction: Instruction, bytes: Uint8Array, operands: string = null, isJumpInstruction: boolean = false) {
175-
if (this.jumpDestination && (this.jumpDestination < 0 || this.jumpDestination >= this.uint8Array.length)) {
175+
if (this.jumpDestination && (this.jumpDestination < 0 || this.jumpDestination >= this.uint8Array.length - this.headerSize)) {
176176
this.warning = 'This instruction is problematic! Destination address does not exist.';
177177
}
178178
this.disassembledInstructions.push(new DisassembledInstruction(this.address, instruction, operands, isJumpInstruction ? this.jumpDestination : null, this.warning, bytes));

0 commit comments

Comments
 (0)