Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)