summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-15 17:48:15 +0200
committerAnatol Belski <ab@php.net>2014-09-15 19:46:30 +0200
commite0ff5238c5d744509f93aaf914e23f17d51c5ae3 (patch)
treed036f7bc535028c9025da2641bfd5360f0350872 /Zend/zend_operators.h
parent383a0773ff27cf57b94fe11d2f825b00cff88714 (diff)
downloadphp-git-e0ff5238c5d744509f93aaf914e23f17d51c5ae3.tar.gz
fix negating an unsigned
Diffstat (limited to 'Zend/zend_operators.h')
-rw-r--r--Zend/zend_operators.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 41342de020..a50e65d7c2 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -1036,7 +1036,7 @@ static zend_always_inline void fast_is_not_identical_function(zval *result, zval
/* buf points to the END of the buffer */
#define _zend_print_signed_to_buf(buf, num, vartype, result) do { \
if (num < 0) { \
- _zend_print_unsigned_to_buf((buf), -(vartype)(num), vartype, (result)); \
+ _zend_print_unsigned_to_buf((buf), (~((vartype)(num)) + 1), vartype, (result)); \
*--(result) = '-'; \
} else { \
_zend_print_unsigned_to_buf((buf), (num), vartype, (result)); \