From e8360467c97173a4438f81e0272d1f8c19b6c408 Mon Sep 17 00:00:00 2001 From: Miran Date: Tue, 12 Mar 2024 05:18:57 +0100 Subject: [PATCH] Allow 0051 to return cleo functions in main.scm too. --- source/CCustomOpcodeSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CCustomOpcodeSystem.cpp b/source/CCustomOpcodeSystem.cpp index 43e4a7bf..c03d6059 100644 --- a/source/CCustomOpcodeSystem.cpp +++ b/source/CCustomOpcodeSystem.cpp @@ -856,7 +856,7 @@ namespace CLEO OpcodeResult __stdcall CCustomOpcodeSystem::opcode_0051(CRunningScript* thread) // GOSUB return { - if (thread->SP == 0 && thread->IsCustom() && !IsLegacyScript(thread)) // CLEO5 - allow use of GOSUB `return` to exit cleo calls too + if (thread->SP == 0 && !IsLegacyScript(thread)) // CLEO5 - allow use of GOSUB `return` to exit cleo calls too { return GetInstance().OpcodeSystem.CleoReturnGeneric(0x0051, thread, false); // try CLEO's function return }