Skip to content

Commit cbaade2

Browse files
committed
[[ Bug 19771 ]] Fix incorrect validation method for JumpIf
The validator for the JumpIf bytecode was using the wrong argument to compute the address. This has been fixed.
1 parent 03b363a commit cbaade2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libscript/src/script-bytecode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct MCScriptBytecodeOp_JumpIf
121121
ctxt.CheckArity(2);
122122
ctxt.CheckRegister(ctxt.GetArgument(0));
123123
ctxt.CheckAddress(ctxt.GetAddress() +
124-
ctxt.GetSignedArgument(0));
124+
ctxt.GetSignedArgument(1));
125125
}
126126

127127
static void Execute(MCScriptExecuteContext& ctxt)

0 commit comments

Comments
 (0)