aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index 99ed3d41..34a52390 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.239 2014/10/25 11:50:46 roberto Exp roberto $ 2** $Id: lapi.c,v 2.240 2014/10/28 17:27:50 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*/
@@ -968,7 +968,7 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
968 status = luaD_protectedparser(L, &z, chunkname, mode); 968 status = luaD_protectedparser(L, &z, chunkname, mode);
969 if (status == LUA_OK) { /* no errors? */ 969 if (status == LUA_OK) { /* no errors? */
970 LClosure *f = clLvalue(L->top - 1); /* get newly created function */ 970 LClosure *f = clLvalue(L->top - 1); /* get newly created function */
971 if (f->nupvalues == 1) { /* does it have one upvalue? */ 971 if (f->nupvalues >= 1) { /* does it have an upvalue? */
972 /* get global table from registry */ 972 /* get global table from registry */
973 Table *reg = hvalue(&G(L)->l_registry); 973 Table *reg = hvalue(&G(L)->l_registry);
974 const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS); 974 const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS);