]> granicus.if.org Git - php/commitdiff
boolean comparison didn't work with smaller-than and greater-than, something that
authorZeev Suraski <zeev@php.net>
Sun, 23 May 1999 22:07:04 +0000 (22:07 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 23 May 1999 22:07:04 +0000 (22:07 +0000)
fucked up berber's site a bit.  fixed.

Zend/zend_operators.c

index d6455cca8542fa4d26d1fe39d0cd9ca40e9161f8..59176bb1f807877b37c566aa74762d243039bca8 100644 (file)
@@ -895,7 +895,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
                zendi_convert_to_boolean(op1, op1_copy);
                zendi_convert_to_boolean(op2, op2_copy);
                result->type = IS_LONG;
-               result->value.lval = (op1->value.lval!=op2->value.lval);
+               result->value.lval = op1->value.lval - op2->value.lval;
                return SUCCESS;
        }
        zendi_convert_scalar_to_number(op1, op1_copy);