aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lbaselib.c b/lbaselib.c
index bd53a38d..96e26a9a 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.215 2009/04/08 18:04:33 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.216 2009/07/08 16:06:07 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -419,6 +419,7 @@ static int luaB_pcall (lua_State *L) {
419 int status; 419 int status;
420 luaL_checkany(L, 1); 420 luaL_checkany(L, 1);
421 status = lua_pcallk(L, lua_gettop(L) - 1, LUA_MULTRET, 0, 0, pcallcont); 421 status = lua_pcallk(L, lua_gettop(L) - 1, LUA_MULTRET, 0, 0, pcallcont);
422 luaL_checkstack(L, 1, NULL);
422 lua_pushboolean(L, (status == LUA_OK)); 423 lua_pushboolean(L, (status == LUA_OK));
423 lua_insert(L, 1); 424 lua_insert(L, 1);
424 return lua_gettop(L); /* return status + all results */ 425 return lua_gettop(L); /* return status + all results */
@@ -434,6 +435,7 @@ static int luaB_xpcall (lua_State *L) {
434 lua_replace(L, 1); 435 lua_replace(L, 1);
435 lua_replace(L, 2); 436 lua_replace(L, 2);
436 status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 1, pcallcont); 437 status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 1, pcallcont);
438 luaL_checkstack(L, 1, NULL);
437 lua_pushboolean(L, (status == LUA_OK)); 439 lua_pushboolean(L, (status == LUA_OK));
438 lua_replace(L, 1); 440 lua_replace(L, 1);
439 return lua_gettop(L); /* return status + all results */ 441 return lua_gettop(L); /* return status + all results */