Skip to content

Commit

Permalink
Allow 0051 to return cleo functions in main.scm too. (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC authored Mar 12, 2024
1 parent c5f4858 commit 339b5ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/CCustomOpcodeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 339b5ac

Please sign in to comment.