Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2023-08-28 21:08:00 +02:00
commit 631a45f73b
2 changed files with 5 additions and 3 deletions

View File

@ -307,9 +307,9 @@ int luaJIT_setmode(lua_State *L, int idx, int mode)
} else { } else {
return 0; /* Failed. */ return 0; /* Failed. */
} }
g->bc_cfunc_ext = BCINS_AD(BC_FUNCCW, 0, 0); setbc_op(&g->bc_cfunc_ext, BC_FUNCCW);
} else { } else {
g->bc_cfunc_ext = BCINS_AD(BC_FUNCC, 0, 0); setbc_op(&g->bc_cfunc_ext, BC_FUNCC);
} }
break; break;
default: default:

View File

@ -2513,9 +2513,11 @@ static void parse_for_num(LexState *ls, GCstr *varname, BCLine line)
*/ */
static int predict_next(LexState *ls, FuncState *fs, BCPos pc) static int predict_next(LexState *ls, FuncState *fs, BCPos pc)
{ {
BCIns ins = fs->bcbase[pc].ins; BCIns ins;
GCstr *name; GCstr *name;
cTValue *o; cTValue *o;
if (pc >= fs->bclim) return 0;
ins = fs->bcbase[pc].ins;
switch (bc_op(ins)) { switch (bc_op(ins)) {
case BC_MOV: case BC_MOV:
if (bc_d(ins) >= fs->nactvar) return 0; if (bc_d(ins) >= fs->nactvar) return 0;