From 5fabed21a17b133182a7e47712b7c7602ea87401 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 26 Jun 2002 17:36:17 -0300 Subject: [PATCH] getglobals(0) is the C global table --- lbaselib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbaselib.c b/lbaselib.c index 40567969..48544e2b 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.86 2002/06/26 16:37:13 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.87 2002/06/26 19:28:44 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -111,7 +111,7 @@ static int luaB_setmetatable (lua_State *L) { static int luaB_getglobals (lua_State *L) { int level = luaL_opt_int(L, 1, 1); - luaL_arg_check(L, level >= 1, 2, "level must be positive"); + luaL_arg_check(L, level >= 0, 2, "level must be non-negative"); lua_getglobals(L, level); /* value to be returned */ return 1; }