diff options
author | Stanislav Malyshev <stas@php.net> | 2000-12-17 16:02:59 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2000-12-17 16:02:59 +0000 |
commit | 98f2db94ecc647e43599ce40c089bdcc77b14f3a (patch) | |
tree | 330685af5964908655bf0c4a3a38b322c85495ea /Zend/zend_operators.c | |
parent | 8b1377043dfccffaf7ffefc796afced571b17735 (diff) | |
download | php-git-98f2db94ecc647e43599ce40c089bdcc77b14f3a.tar.gz |
Fix #8279 (-2147483647 > 2147483647).
# Long addition/subtraction may not fit long.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index a232e56af5..a0fbe9917b 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1137,7 +1137,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2) if (op1->type == IS_LONG && op2->type == IS_LONG) { result->type = IS_LONG; - result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval); + result->value.lval = op1->value.lval>op2->value.lval?1:(op1->value.lval<op2->value.lval?-1:0); return SUCCESS; } if ((op1->type == IS_DOUBLE || op1->type == IS_LONG) |