aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index 3583e9c0..163533a2 100644
--- a/lapi.c
+++ b/lapi.c
@@ -74,7 +74,8 @@ static TValue *index2value (lua_State *L, int idx) {
74 return &G(L)->nilvalue; /* it has no upvalues */ 74 return &G(L)->nilvalue; /* it has no upvalues */
75 else { 75 else {
76 CClosure *func = clCvalue(s2v(ci->func)); 76 CClosure *func = clCvalue(s2v(ci->func));
77 return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : &G(L)->nilvalue; 77 return (idx <= func->nupvalues) ? &func->upvalue[idx-1]
78 : &G(L)->nilvalue;
78 } 79 }
79 } 80 }
80} 81}