diff --git a/3rd/lua/ldebug.c b/3rd/lua/ldebug.c index a75bceec..9d66f955 100644 --- a/3rd/lua/ldebug.c +++ b/3rd/lua/ldebug.c @@ -118,7 +118,7 @@ LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { static const char *upvalname (Proto *p, int uv) { - TString *s = check_exp(uv < p->sizeupvalues, p->sp->upvalues[uv].name); + TString *s = check_exp(uv < p->sp->sizeupvalues, p->sp->upvalues[uv].name); if (s == NULL) return "?"; else return getstr(s); } diff --git a/3rd/lua/ldo.c b/3rd/lua/ldo.c index a141c2fd..db222be8 100644 --- a/3rd/lua/ldo.c +++ b/3rd/lua/ldo.c @@ -768,7 +768,7 @@ static void f_parser (lua_State *L, void *ud) { checkmode(L, p->mode, "text"); cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c); } - lua_assert(cl->nupvalues == cl->p->sizeupvalues); + lua_assert(cl->nupvalues == cl->p->sp->sizeupvalues); luaF_initupvals(L, cl); } diff --git a/3rd/lua/lparser.c b/3rd/lua/lparser.c index 7845ccf1..53c5cdd5 100644 --- a/3rd/lua/lparser.c +++ b/3rd/lua/lparser.c @@ -1597,7 +1597,7 @@ static void statement (LexState *ls) { break; } } - lua_assert(ls->fs->f->maxstacksize >= ls->fs->freereg && + lua_assert(ls->fs->f->sp->maxstacksize >= ls->fs->freereg && ls->fs->freereg >= ls->fs->nactvar); ls->fs->freereg = ls->fs->nactvar; /* free registers */ leavelevel(ls); diff --git a/3rd/lua/lundump.c b/3rd/lua/lundump.c index 5e0224c5..39674cd9 100644 --- a/3rd/lua/lundump.c +++ b/3rd/lua/lundump.c @@ -273,7 +273,7 @@ LClosure *luaU_undump(lua_State *L, ZIO *Z, const char *name) { luaD_inctop(L); cl->p = luaF_newproto(L, NULL); LoadFunction(&S, cl->p, NULL); - lua_assert(cl->nupvalues == cl->p->sizeupvalues); + lua_assert(cl->nupvalues == cl->p->sp->sizeupvalues); luai_verifycode(L, buff, cl->p); return cl; } diff --git a/3rd/lua/lvm.c b/3rd/lua/lvm.c index 3fa87cb1..9fc24af1 100644 --- a/3rd/lua/lvm.c +++ b/3rd/lua/lvm.c @@ -1163,7 +1163,7 @@ void luaV_execute (lua_State *L) { oci->u.l.savedpc = nci->u.l.savedpc; oci->callstatus |= CIST_TAIL; /* function was tail called */ ci = L->ci = oci; /* remove new frame */ - lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize); + lua_assert(L->top == oci->u.l.base + getproto(ofunc)->sp->maxstacksize); goto newframe; /* restart luaV_execute over new Lua function */ } vmbreak;