diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-31 17:53:01 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-31 17:53:01 -0200 |
commit | b68fb7f62e1475e28a4cb27569e8b659f925e114 (patch) | |
tree | f6f68d64789b0970fbc2ec4dcc74de5ab9f23b13 /lbaselib.c | |
parent | 60ff79451c32e1e6dbec001846871aa878c43289 (diff) | |
download | lua-b68fb7f62e1475e28a4cb27569e8b659f925e114.tar.gz lua-b68fb7f62e1475e28a4cb27569e8b659f925e114.tar.bz2 lua-b68fb7f62e1475e28a4cb27569e8b659f925e114.zip |
`assert' returns its first argument
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 | ||