From: Derick Rethans Date: Sun, 14 Jul 2002 09:37:42 +0000 (+0000) Subject: - MFZE1 X-Git-Tag: dev~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcd67e0b149bb92f390adbbbc33a61d8043103dc;p=php - MFZE1 --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 32af2f076b..b7857a2d03 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1451,10 +1451,9 @@ ZEND_API int increment_function(zval *op1) { switch (op1->type) { case IS_BOOL: - if (op1->value.lval) { - op1->type = IS_LONG; + if (!op->value.lval) { + op1->value.lval = 1; } - op1->value.lval++; break; case IS_LONG: if(op1->value.lval == LONG_MAX) { @@ -1519,10 +1518,11 @@ ZEND_API int decrement_function(zval *op1) switch (op1->type) { case IS_BOOL: - if (!op1->value.lval) { - op1->type = IS_LONG; + if (op->value.lval) { + op1->value.lval = 0; + } else { + op1->value.lval = 1; } - op1->value.lval--; break; case IS_LONG: if(op1->value.lval == LONG_MIN) {