1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-08 19:44:06 +00:00

Fixed bug where ctx dereference was placed before the validity check, instead of after

This commit is contained in:
Bryan Roe
2022-07-02 10:42:54 -07:00
parent 44e2dfaae4
commit 6409183e72

View File

@@ -1163,10 +1163,11 @@ void ILibDuktape_Polyfills_timer_elapsed(void *obj)
{
ILibDuktape_Timer *ptrs = (ILibDuktape_Timer*)obj;
int argCount, i;
duk_context *ctx = ptrs->ctx;
char *funcName;
if (!ILibMemory_CanaryOK(ptrs)) { return; }
duk_context *ctx = ptrs->ctx;
if (duk_check_stack(ctx, 3) == 0) { return; }
duk_push_heapptr(ctx, ptrs->callback); // [func]