diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-16 13:30:50 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-03-16 13:30:50 -0300 |
| commit | 9e613b85838f044327b3735c1ff66b98a1a3567e (patch) | |
| tree | 8b1bfabbb8954ca855d3c74a7a5c96b9b630fc88 | |
| parent | 9428ec42d0c17e5ebb887c01bab419a42a1072db (diff) | |
| download | lua-9e613b85838f044327b3735c1ff66b98a1a3567e.tar.gz lua-9e613b85838f044327b3735c1ff66b98a1a3567e.tar.bz2 lua-9e613b85838f044327b3735c1ff66b98a1a3567e.zip | |
missing argument to 'assert' raises "assertion failed" error
| -rw-r--r-- | lbaselib.c | 3 |
1 files changed, 1 insertions, 2 deletions
| @@ -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 | ||
| 366 | static int luaB_assert (lua_State *L) { | 366 | static 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); |
