diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -264,7 +264,7 @@ static int luaB_loadfile (lua_State *L) { | |||
264 | 264 | ||
265 | static int luaB_assert (lua_State *L) { | 265 | static int luaB_assert (lua_State *L) { |
266 | luaL_check_any(L, 1); | 266 | luaL_check_any(L, 1); |
267 | if (!lua_istrue(L, 1)) | 267 | if (!lua_toboolean(L, 1)) |
268 | luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, "")); | 268 | luaL_verror(L, "assertion failed! %.90s", luaL_opt_string(L, 2, "")); |
269 | lua_settop(L, 1); | 269 | lua_settop(L, 1); |
270 | return 1; | 270 | return 1; |
@@ -569,7 +569,7 @@ static int sort_comp (lua_State *L, int a, int b) { | |||
569 | lua_pushvalue(L, a-1); /* -1 to compensate function */ | 569 | lua_pushvalue(L, a-1); /* -1 to compensate function */ |
570 | lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ | 570 | lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ |
571 | lua_rawcall(L, 2, 1); | 571 | lua_rawcall(L, 2, 1); |
572 | res = lua_istrue(L, -1); | 572 | res = lua_toboolean(L, -1); |
573 | lua_pop(L, 1); | 573 | lua_pop(L, 1); |
574 | return res; | 574 | return res; |
575 | } | 575 | } |