summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2000-12-17 16:02:59 +0000
committerStanislav Malyshev <stas@php.net>2000-12-17 16:02:59 +0000
commit98f2db94ecc647e43599ce40c089bdcc77b14f3a (patch)
tree330685af5964908655bf0c4a3a38b322c85495ea /Zend/zend_operators.c
parent8b1377043dfccffaf7ffefc796afced571b17735 (diff)
downloadphp-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.c2
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)