From b68fb7f62e1475e28a4cb27569e8b659f925e114 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 31 Jan 2001 17:53:01 -0200 Subject: `assert' returns its first argument --- lbaselib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index 669e8e87..997dcb84 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.18 2001/01/10 16:58:11 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.19 2001/01/25 16:45:36 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -404,7 +404,8 @@ static int luaB_assert (lua_State *L) { luaL_checkany(L, 1); if (lua_isnil(L, 1)) luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, "")); - return 0; + lua_settop(L, 1); + return 1; } -- cgit v1.2.3-55-g6feb