Skip to content

Commit f9718af

Browse files
there was a critical bug.
1 parent 3a5baa9 commit f9718af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

RSDKv4/Script.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4402,11 +4402,11 @@ void ProcessScript(int scriptCodePtr, int jumpTablePtr, byte scriptEvent)
44024402
}
44034403
case FUNC_CALLNATIVEFUNCTION:
44044404
opcodeSize = 0;
4405-
if (scriptEng.operands[0] <= 0xF)
4405+
if (scriptEng.operands[0] >= 0 && scriptEng.operands[0] <= 0xF)
44064406
nativeFunction[scriptEng.operands[0]](0x00, NULL);
44074407
break;
44084408
case FUNC_CALLNATIVEFUNCTION2:
4409-
if (scriptEng.operands[0] <= 0xF) {
4409+
if (scriptEng.operands[0] >= 0 && scriptEng.operands[0] <= 0xF) {
44104410
if (StrLength(scriptText)) {
44114411
nativeFunction[scriptEng.operands[0]](scriptEng.operands[2], scriptText);
44124412
}
@@ -4417,7 +4417,7 @@ void ProcessScript(int scriptCodePtr, int jumpTablePtr, byte scriptEvent)
44174417
}
44184418
break;
44194419
case FUNC_CALLNATIVEFUNCTION4:
4420-
if (scriptEng.operands[0] <= 0xF)
4420+
if (scriptEng.operands[0] >= 0 && scriptEng.operands[0] <= 0xF)
44214421
nativeFunction[scriptEng.operands[0]](scriptEng.operands[1],
44224422
reinterpret_cast<void *>(static_cast<intptr_t>(scriptEng.operands[2])));
44234423
break;

0 commit comments

Comments
 (0)