mirror of
https://github.com/lua/lua
synced 2025-02-12 11:14:05 +03:00
missing argument to 'assert' raises "assertion failed" error
This commit is contained in:
parent
9428ec42d0
commit
9e613b8583
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user