diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.217 2009/07/15 17:35:20 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.218 2009/08/04 18:20:18 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 | */ |
@@ -432,8 +432,7 @@ static int luaB_xpcall (lua_State *L) { | |||
432 | int n = lua_gettop(L); | 432 | int n = lua_gettop(L); |
433 | luaL_argcheck(L, n >= 2, 2, "value expected"); | 433 | luaL_argcheck(L, n >= 2, 2, "value expected"); |
434 | lua_pushvalue(L, 1); /* exchange function... */ | 434 | lua_pushvalue(L, 1); /* exchange function... */ |
435 | lua_pushvalue(L, 2); /* ...and error handler */ | 435 | lua_copy(L, 2, 1); /* ...and error handler */ |
436 | lua_replace(L, 1); | ||
437 | lua_replace(L, 2); | 436 | lua_replace(L, 2); |
438 | status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 1, pcallcont); | 437 | status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 1, pcallcont); |
439 | luaL_checkstack(L, 1, NULL); | 438 | luaL_checkstack(L, 1, NULL); |