diff options
-rw-r--r-- | lauxlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.134 2005/05/25 13:21:26 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.135 2005/05/31 14:25:18 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 | */ |
@@ -103,7 +103,8 @@ LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def, | |||
103 | for (i=0; lst[i]; i++) | 103 | for (i=0; lst[i]; i++) |
104 | if (strcmp(lst[i], name) == 0) | 104 | if (strcmp(lst[i], name) == 0) |
105 | return i; | 105 | return i; |
106 | return luaL_error(L, "invalid option " LUA_QS, name); | 106 | return luaL_argerror(L, narg, |
107 | lua_pushfstring(L, "invalid option " LUA_QS, name)); | ||
107 | } | 108 | } |
108 | 109 | ||
109 | 110 | ||