lua

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

commit 9e613b85838f044327b3735c1ff66b98a1a3567e
parent 9428ec42d0c17e5ebb887c01bab419a42a1072db
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 16 Mar 2009 13:30:26 -0300

missing argument to 'assert' raises "assertion failed" error

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

diff --git a/lbaselib.c b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.211 2009/03/10 17:14:37 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.212 2009/03/13 15:50:03 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -364,7 +364,6 @@ static int luaB_dofile (lua_State *L) { 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!")); return lua_gettop(L);