1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 09:57:14 +01:00

Retrieve closure object from the stack.

This commit is contained in:
Sandu Liviu Catalin 2020-04-30 21:02:25 +03:00
parent 185c51ef8f
commit 4500eb0a2c

View File

@ -206,6 +206,7 @@ struct Function {
return cenv; // Just stop knowing this is what we want
// Is the callback is valid?
} else if (ty2 & (_RT_CLOSURE | _RT_NATIVECLOSURE)) {
if (SQ_FAILED(sq_getstackobj(vm, idx2, &mObj))) return false;
// Reference the environment and function
sq_addref(vm, &mEnv);
sq_addref(vm, &mObj);