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

Function Script_Stack_Push

src/script/script.c:182–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180void Script_Stack_Push(ScriptEngine *script, uint16 value, const char *filename, int lineno)
181#else
182void Script_Stack_Push(ScriptEngine *script, uint16 value)
183#endif
184{
185 if (script->stackPointer == 0) {
186#ifdef _DEBUG
187 Script_Error("Stack Overflow at %s:%d", filename, lineno);
188#else
189 Script_Error("Stack Overflow");
190#endif
191 script->script = NULL;
192 return;
193 }
194
195 script->stack[--script->stackPointer] = value;
196}
197
198/**
199 * Pop a value from the stack.

Callers

nothing calls this directly

Calls 1

Script_ErrorFunction · 0.85

Tested by

no test coverage detected