diff options
Diffstat (limited to 'lauxlib.c')
| -rw-r--r-- | lauxlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.30 2000/08/09 19:16:57 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.31 2000/08/28 17:57:04 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -32,8 +32,7 @@ int luaL_findstring (const char *name, const char *const list[]) { | |||
| 32 | void luaL_argerror (lua_State *L, int narg, const char *extramsg) { | 32 | void luaL_argerror (lua_State *L, int narg, const char *extramsg) { |
| 33 | lua_Debug ar; | 33 | lua_Debug ar; |
| 34 | lua_getstack(L, 0, &ar); | 34 | lua_getstack(L, 0, &ar); |
| 35 | lua_getinfo(L, "nu", &ar); | 35 | lua_getinfo(L, "n", &ar); |
| 36 | narg -= ar.nups; | ||
| 37 | if (ar.name == NULL) | 36 | if (ar.name == NULL) |
| 38 | ar.name = "?"; | 37 | ar.name = "?"; |
| 39 | luaL_verror(L, "bad argument #%d to `%.50s' (%.100s)", | 38 | luaL_verror(L, "bad argument #%d to `%.50s' (%.100s)", |
