aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-31 17:53:01 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-31 17:53:01 -0200
commitb68fb7f62e1475e28a4cb27569e8b659f925e114 (patch)
treef6f68d64789b0970fbc2ec4dcc74de5ab9f23b13 /lbaselib.c
parent60ff79451c32e1e6dbec001846871aa878c43289 (diff)
downloadlua-b68fb7f62e1475e28a4cb27569e8b659f925e114.tar.gz
lua-b68fb7f62e1475e28a4cb27569e8b659f925e114.tar.bz2
lua-b68fb7f62e1475e28a4cb27569e8b659f925e114.zip
`assert' returns its first argument
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 669e8e87..997dcb84 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.18 2001/01/10 16:58:11 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.19 2001/01/25 16:45:36 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*/
@@ -404,7 +404,8 @@ static int luaB_assert (lua_State *L) {
404 luaL_checkany(L, 1); 404 luaL_checkany(L, 1);
405 if (lua_isnil(L, 1)) 405 if (lua_isnil(L, 1))
406 luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, "")); 406 luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, ""));
407 return 0; 407 lua_settop(L, 1);
408 return 1;
408} 409}
409 410
410 411