]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix external C call stack check when using LUAJIT_MODE_WRAPCFUNC.
authorMike Pall <mike>
Mon, 28 Aug 2023 19:04:01 +0000 (21:04 +0200)
committerMike Pall <mike>
Mon, 28 Aug 2023 19:04:01 +0000 (21:04 +0200)
Thanks to Peter Cawley. #1047

src/lj_dispatch.c

index 8009d289ecf263657fcfe273b5a844913e9d7fea..63e097528a5a03c46dbb7853e2afb165cc160d69 100644 (file)
@@ -292,9 +292,9 @@ int luaJIT_setmode(lua_State *L, int idx, int mode)
       } else {
        return 0;  /* Failed. */
       }
-      g->bc_cfunc_ext = BCINS_AD(BC_FUNCCW, 0, 0);
+      setbc_op(&g->bc_cfunc_ext, BC_FUNCCW);
     } else {
-      g->bc_cfunc_ext = BCINS_AD(BC_FUNCC, 0, 0);
+      setbc_op(&g->bc_cfunc_ext, BC_FUNCC);
     }
     break;
   default: