0
0
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:
Stefan Siegl 2017-03-10 22:49:23 +01:00
parent e5f57b7661
commit 78807b6720

View File

@ -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));
}
}
/* }}} */