diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -574,7 +574,10 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) { | |||
574 | 574 | ||
575 | LUA_API void lua_pushboolean (lua_State *L, int b) { | 575 | LUA_API void lua_pushboolean (lua_State *L, int b) { |
576 | lua_lock(L); | 576 | lua_lock(L); |
577 | setbvalue(s2v(L->top), (b != 0)); /* ensure that true is 1 */ | 577 | if (b) |
578 | setbtvalue(s2v(L->top)); | ||
579 | else | ||
580 | setbfvalue(s2v(L->top)); | ||
578 | api_incr_top(L); | 581 | api_incr_top(L); |
579 | lua_unlock(L); | 582 | lua_unlock(L); |
580 | } | 583 | } |