diff options
author | Derick Rethans <derick@php.net> | 2002-07-14 09:29:42 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2002-07-14 09:29:42 +0000 |
commit | 643f21e84093c3e65015b7410c3f5c195e49c453 (patch) | |
tree | c0222b2ec755ba329f3d97c83138b22880c6e154 /Zend/zend_operators.c | |
parent | 52f1ae5ac5ffabb3fcfad4cbf557d8ec1d579e5e (diff) | |
download | php-git-643f21e84093c3e65015b7410c3f5c195e49c453.tar.gz |
- MFZE1
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 5fdd1c1eb6..32af2f076b 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1450,6 +1450,12 @@ static void increment_string(zval *str) ZEND_API int increment_function(zval *op1) { switch (op1->type) { + case IS_BOOL: + if (op1->value.lval) { + op1->type = IS_LONG; + } + op1->value.lval++; + break; case IS_LONG: if(op1->value.lval == LONG_MAX) { /* switch to double */ @@ -1512,6 +1518,12 @@ ZEND_API int decrement_function(zval *op1) double dval; switch (op1->type) { + case IS_BOOL: + if (!op1->value.lval) { + op1->type = IS_LONG; + } + op1->value.lval--; + break; case IS_LONG: if(op1->value.lval == LONG_MIN) { double d = (double)op1->value.lval; |