aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lapi.c b/lapi.c
index 0f88e8de..8d4d5e7d 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.271 2017/10/11 12:38:45 roberto Exp roberto $ 2** $Id: lapi.c,v 2.272 2017/11/01 18:20:48 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -58,10 +58,9 @@ const char lua_ident[] =
58 58
59 59
60static TValue *index2value (lua_State *L, int idx) { 60static TValue *index2value (lua_State *L, int idx) {
61 CallInfo *ci = L->ci;
62 if (idx > 0) { 61 if (idx > 0) {
63 StkId o = L->func + idx; 62 StkId o = L->func + idx;
64 api_check(L, idx <= ci->top - (L->func + 1), "unacceptable index"); 63 api_check(L, idx <= L->ci->top - (L->func + 1), "unacceptable index");
65 if (o >= L->top) return NONVALIDVALUE; 64 if (o >= L->top) return NONVALIDVALUE;
66 else return s2v(o); 65 else return s2v(o);
67 } 66 }
@@ -1000,7 +999,7 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc,
1000 ci->u.c.k = k; /* save continuation */ 999 ci->u.c.k = k; /* save continuation */
1001 ci->u.c.ctx = ctx; /* save context */ 1000 ci->u.c.ctx = ctx; /* save context */
1002 /* save information for error recovery */ 1001 /* save information for error recovery */
1003 ci->extra = savestack(L, c.func); 1002 ci->u2.funcidx = savestack(L, c.func);
1004 ci->u.c.old_errfunc = L->errfunc; 1003 ci->u.c.old_errfunc = L->errfunc;
1005 L->errfunc = func; 1004 L->errfunc = func;
1006 setoah(ci->callstatus, L->allowhook); /* save value of 'allowhook' */ 1005 setoah(ci->callstatus, L->allowhook); /* save value of 'allowhook' */