summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/mt_rand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/mt_rand.c b/ext/standard/mt_rand.c
index c0b1d0ac1a..f2866c5af2 100644
--- a/ext/standard/mt_rand.c
+++ b/ext/standard/mt_rand.c
@@ -276,6 +276,7 @@ PHP_FUNCTION(mt_rand)
if (UNEXPECTED(max < min)) {
php_error_docref(NULL, E_WARNING, "max(" ZEND_LONG_FMT ") is smaller than min(" ZEND_LONG_FMT ")", max, min);
+ max ^= min ^= max ^= min;
}
if (BG(mt_rand_mode) == MT_RAND_MT19937) {