lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 6b41e84da577b2d31cc659255b036bd0c2d6483f
parent 359840c2f801aa7dd5044c023bf86015ff4e8eef
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 21 Jun 2004 13:44:47 -0300

`assert' returns all its parameters (not only the first)

Diffstat:
Mlbaselib.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lbaselib.c b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.146 2004/06/04 15:30:53 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.147 2004/06/15 13:31:30 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -319,8 +319,7 @@ static int luaB_assert (lua_State *L) { luaL_checkany(L, 1); if (!lua_toboolean(L, 1)) return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!")); - lua_settop(L, 1); - return 1; + return lua_gettop(L); }