mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
fix unsigned negation
This commit is contained in:
parent
d3622c2445
commit
4e09d782ef
@ -163,7 +163,7 @@ ZEND_API zend_ast *zend_ast_create_list(uint32_t init_children, zend_ast_kind ki
|
||||
}
|
||||
|
||||
static inline zend_bool is_power_of_two(uint32_t n) {
|
||||
return n == (n & -n);
|
||||
return ((n != 0) && (n == (n & (~n + 1))));
|
||||
}
|
||||
|
||||
ZEND_API zend_ast *zend_ast_list_add(zend_ast *ast, zend_ast *op) {
|
||||
|
Loading…
Reference in New Issue
Block a user