diff --git a/RSDKv4/Script.cpp b/RSDKv4/Script.cpp index edfe34b71..cff6b9629 100644 --- a/RSDKv4/Script.cpp +++ b/RSDKv4/Script.cpp @@ -4863,11 +4863,11 @@ void ProcessScript(int scriptCodePtr, int jumpTablePtr, byte scriptEvent) break; } case FUNC_RETURN: - opcodeSize = 0; - if (!functionStackPos) { //event, stop running + opcodeSize = 0; + if (!functionStackPos) { // event, stop running running = false; } - else { //function, jump out + else { // function, jump out scriptCodePtr = functionStack[--functionStackPos]; jumpTablePtr = functionStack[--functionStackPos]; scriptDataPtr = functionStack[--functionStackPos];