diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-21 13:45:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-21 13:45:09 -0300 |
commit | 6b41e84da577b2d31cc659255b036bd0c2d6483f (patch) | |
tree | bc2f39e2d4bb1f8ab9c4e923871b7c6afe48b0df /lbaselib.c | |
parent | 359840c2f801aa7dd5044c023bf86015ff4e8eef (diff) | |
download | lua-6b41e84da577b2d31cc659255b036bd0c2d6483f.tar.gz lua-6b41e84da577b2d31cc659255b036bd0c2d6483f.tar.bz2 lua-6b41e84da577b2d31cc659255b036bd0c2d6483f.zip |
`assert' returns all its parameters (not only the first)
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.146 2004/06/04 15:30:53 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.147 2004/06/15 13:31:30 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 | */ |
@@ -319,8 +319,7 @@ static int luaB_assert (lua_State *L) { | |||
319 | luaL_checkany(L, 1); | 319 | luaL_checkany(L, 1); |
320 | if (!lua_toboolean(L, 1)) | 320 | if (!lua_toboolean(L, 1)) |
321 | return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!")); | 321 | return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!")); |
322 | lua_settop(L, 1); | 322 | return lua_gettop(L); |
323 | return 1; | ||
324 | } | 323 | } |
325 | 324 | ||
326 | 325 | ||