Skip to content

Commit

Permalink
there was a critical bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubberduckycooly committed May 9, 2021
1 parent 3a5baa9 commit f9718af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RSDKv4/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4402,11 +4402,11 @@ void ProcessScript(int scriptCodePtr, int jumpTablePtr, byte scriptEvent)
}
case FUNC_CALLNATIVEFUNCTION:
opcodeSize = 0;
if (scriptEng.operands[0] <= 0xF)
if (scriptEng.operands[0] >= 0 && scriptEng.operands[0] <= 0xF)
nativeFunction[scriptEng.operands[0]](0x00, NULL);
break;
case FUNC_CALLNATIVEFUNCTION2:
if (scriptEng.operands[0] <= 0xF) {
if (scriptEng.operands[0] >= 0 && scriptEng.operands[0] <= 0xF) {
if (StrLength(scriptText)) {
nativeFunction[scriptEng.operands[0]](scriptEng.operands[2], scriptText);
}
Expand All @@ -4417,7 +4417,7 @@ void ProcessScript(int scriptCodePtr, int jumpTablePtr, byte scriptEvent)
}
break;
case FUNC_CALLNATIVEFUNCTION4:
if (scriptEng.operands[0] <= 0xF)
if (scriptEng.operands[0] >= 0 && scriptEng.operands[0] <= 0xF)
nativeFunction[scriptEng.operands[0]](scriptEng.operands[1],
reinterpret_cast<void *>(static_cast<intptr_t>(scriptEng.operands[2])));
break;
Expand Down

0 comments on commit f9718af

Please sign in to comment.