diff options
author | Derick Rethans <derick@php.net> | 2002-07-14 09:37:42 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2002-07-14 09:37:42 +0000 |
commit | dcd67e0b149bb92f390adbbbc33a61d8043103dc (patch) | |
tree | 78f09510e8fc19a403a7652cc2840a65c0419df0 /Zend/zend_operators.c | |
parent | 643f21e84093c3e65015b7410c3f5c195e49c453 (diff) | |
download | php-git-dcd67e0b149bb92f390adbbbc33a61d8043103dc.tar.gz |
- MFZE1
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 12 |
1 files changed, 6 insertions, 6 deletions
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) { |