aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-03-16 13:30:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-03-16 13:30:50 -0300
commit9e613b85838f044327b3735c1ff66b98a1a3567e (patch)
tree8b1bfabbb8954ca855d3c74a7a5c96b9b630fc88 /lbaselib.c
parent9428ec42d0c17e5ebb887c01bab419a42a1072db (diff)
downloadlua-9e613b85838f044327b3735c1ff66b98a1a3567e.tar.gz
lua-9e613b85838f044327b3735c1ff66b98a1a3567e.tar.bz2
lua-9e613b85838f044327b3735c1ff66b98a1a3567e.zip
missing argument to 'assert' raises "assertion failed" error
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index de4d176b..f82ac840 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.211 2009/03/10 17:14:37 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.212 2009/03/13 15:50:03 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*/
@@ -364,7 +364,6 @@ static int luaB_dofile (lua_State *L) {
364 364
365 365
366static int luaB_assert (lua_State *L) { 366static int luaB_assert (lua_State *L) {
367 luaL_checkany(L, 1);
368 if (!lua_toboolean(L, 1)) 367 if (!lua_toboolean(L, 1))
369 return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!")); 368 return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!"));
370 return lua_gettop(L); 369 return lua_gettop(L);