mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-08 15:48:40 +00:00
do comparison instead of (bool) cast
This commit is contained in:
parent
e5f57b7661
commit
78807b6720
2
v8js.cc
2
v8js.cc
@ -77,7 +77,7 @@ static bool v8js_ini_to_bool(const zend_string *new_value) /* {{{ */
|
||||
} else if (ZSTR_LEN(new_value) == 4 && strcasecmp("true", ZSTR_VAL(new_value)) == 0) {
|
||||
return true;
|
||||
} else {
|
||||
return (bool) atoi(ZSTR_VAL(new_value));
|
||||
return 0 != atoi(ZSTR_VAL(new_value));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user