Skip to content

Commit e3784fb

Browse files
committed
update lua
1 parent ebaffcc commit e3784fb

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

3rd/lua/lapi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ void lua_warning (lua_State *L, const char *msg, int tocont) {
13431343
LUA_API void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue) {
13441344
Udata *u;
13451345
lua_lock(L);
1346-
api_check(L, 0 <= nuvalue && nuvalue < USHRT_MAX, "invalid value");
1346+
api_check(L, 0 <= nuvalue && nuvalue < SHRT_MAX, "invalid value");
13471347
u = luaS_newudata(L, size, nuvalue);
13481348
setuvalue(L, s2v(L->top.p), u);
13491349
api_incr_top(L);

3rd/lua/ldo.c

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ l_noret luaD_throw (lua_State *L, int errcode) {
123123
else { /* thread has no error handler */
124124
global_State *g = G(L);
125125
errcode = luaE_resetthread(L, errcode); /* close all upvalues */
126+
L->status = errcode;
126127
if (g->mainthread->errorJmp) { /* main thread has a handler? */
127128
setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */
128129
luaD_throw(g->mainthread, errcode); /* re-throw in main thread */

3rd/lua/lparser.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int new_localvar (LexState *ls, TString *name) {
198198
checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal,
199199
MAXVARS, "local variables");
200200
luaM_growvector(L, dyd->actvar.arr, dyd->actvar.n + 1,
201-
dyd->actvar.size, Vardesc, USHRT_MAX, "local variables");
201+
dyd->actvar.size, Vardesc, SHRT_MAX, "local variables");
202202
var = &dyd->actvar.arr[dyd->actvar.n++];
203203
var->vd.kind = VDKREG; /* default */
204204
var->vd.name = name;

0 commit comments

Comments
 (0)