MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Script_Stack_Pop

Function Script_Stack_Pop

src/script/script.c:204–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 */
203#ifdef _DEBUG
204uint16 Script_Stack_Pop(ScriptEngine *script, const char *filename, int lineno)
205#else
206uint16 Script_Stack_Pop(ScriptEngine *script)
207#endif
208{
209 if (script->stackPointer >= 15) {
210#ifdef _DEBUG
211 Script_Error("Stack Overflow at %s:%d", filename, lineno);
212#else
213 Script_Error("Stack Overflow");
214#endif
215 script->script = NULL;
216 return 0;
217 }
218
219 return script->stack[script->stackPointer++];
220}
221
222/**
223 * Peek a value from the stack.

Callers

nothing calls this directly

Calls 1

Script_ErrorFunction · 0.85

Tested by

no test coverage detected