Fixed issue #22 (Boolean FALSE is always TRUE)

This commit is contained in:
Xinchen Hui
2016-05-20 11:54:37 +08:00
parent 7cdb287c33
commit 17cbba8b77

4
lua.c
View File

@@ -403,8 +403,10 @@ int php_lua_send_zval_to_lua(lua_State *L, zval *val) /* {{{ */ {
switch (Z_TYPE_P(val)) {
case IS_TRUE:
lua_pushboolean(L, 1);
break;
case IS_FALSE:
lua_pushboolean(L, Z_LVAL_P(val));
lua_pushboolean(L, 0);
break;
case IS_NULL:
lua_pushnil(L);