From ac12f4db4b2f715b1556722b6ed65804cfd6348a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 29 Aug 2000 11:33:31 -0300 Subject: C upvalues are the last arguments to a function --- lauxlib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 2234934b..12d1d067 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.30 2000/08/09 19:16:57 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.31 2000/08/28 17:57:04 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -32,8 +32,7 @@ int luaL_findstring (const char *name, const char *const list[]) { void luaL_argerror (lua_State *L, int narg, const char *extramsg) { lua_Debug ar; lua_getstack(L, 0, &ar); - lua_getinfo(L, "nu", &ar); - narg -= ar.nups; + lua_getinfo(L, "n", &ar); if (ar.name == NULL) ar.name = "?"; luaL_verror(L, "bad argument #%d to `%.50s' (%.100s)", -- cgit v1.2.3-55-g6feb