aboutsummaryrefslogtreecommitdiff
path: root/table.c
diff options
context:
space:
mode:
Diffstat (limited to 'table.c')
-rw-r--r--table.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/table.c b/table.c
index 1ca0b0ec..47ecd2e2 100644
--- a/table.c
+++ b/table.c
@@ -3,7 +3,7 @@
3** Module to control static tables 3** Module to control static tables
4*/ 4*/
5 5
6char *rcs_table="$Id: table.c,v 2.71 1997/06/09 17:28:14 roberto Exp roberto $"; 6char *rcs_table="$Id: table.c,v 2.72 1997/06/17 18:09:31 roberto Exp roberto $";
7 7
8#include "luamem.h" 8#include "luamem.h"
9#include "auxlib.h" 9#include "auxlib.h"
@@ -224,11 +224,10 @@ void lua_pack (void)
224*/ 224*/
225void luaI_nextvar (void) 225void luaI_nextvar (void)
226{ 226{
227 Word next; 227 Word next = lua_isnil(lua_getparam(1)) ? 0 :
228 if (lua_isnil(lua_getparam(1))) 228 luaI_findsymbolbyname(luaL_check_string(1))+1;
229 next = 0; 229 if (next != 0)
230 else 230 luaL_arg_check(s_ttype(next-1)!=LUA_T_NIL, 1, "undefined global name");
231 next = luaI_findsymbolbyname(luaL_check_string(1)) + 1;
232 while (next < lua_ntable && s_ttype(next) == LUA_T_NIL) 231 while (next < lua_ntable && s_ttype(next) == LUA_T_NIL)
233 next++; 232 next++;
234 if (next < lua_ntable) { 233 if (next < lua_ntable) {