Skip to content

Commit

Permalink
More detailed error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Nov 27, 2024
1 parent 66600dc commit c9fa064
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cleo_plugins/MemoryOperations/MemoryOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ class MemoryOperations
}

int diff = oriSp - postSp;
SHOW_ERROR("Function call left stack position changed (%s%d) in script %s \nScript suspended.", diff > 0 ? "+" : "", diff, CLEO::ScriptInfoStr(thread).c_str());
int requiredPop = (numPop + diff) / 4;
SHOW_ERROR("Function call left stack position changed (%s%d). This usually happens when incorrect calling convention is used. \nArgument 'pop' value should have been %d in script %s \nScript suspended.", diff > 0 ? "+" : "", diff, requiredPop, CLEO::ScriptInfoStr(thread).c_str());
return thread->Suspend();
}

Expand Down

0 comments on commit c9fa064

Please sign in to comment.