diff options
Diffstat (limited to '')
| -rw-r--r-- | lauxlib.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.233 2011/06/16 14:11:04 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.234 2011/07/25 17:18:49 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 | */ |
| @@ -330,7 +330,9 @@ LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def, | |||
| 330 | 330 | ||
| 331 | 331 | ||
| 332 | LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { | 332 | LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { |
| 333 | if (!lua_checkstack(L, space)) { | 333 | /* keep some extra space to run error routines, if needed */ |
| 334 | const int extra = 2 * LUA_MINSTACK; | ||
| 335 | if (!lua_checkstack(L, space + extra)) { | ||
| 334 | if (msg) | 336 | if (msg) |
| 335 | luaL_error(L, "stack overflow (%s)", msg); | 337 | luaL_error(L, "stack overflow (%s)", msg); |
| 336 | else | 338 | else |
