Skip to content

Commit 51d3ccd

Browse files
committed
Break both paths
1 parent 901cac3 commit 51d3ccd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/math.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ PHP_FUNCTION(clamp)
429429
Z_PARAM_ZVAL(zmax)
430430
ZEND_PARSE_PARAMETERS_END();
431431

432-
php_math_clamp(return_value, zvalue - 1, zmin + 1, zmax + 1);
432+
php_math_clamp(return_value, zmin, zvalue, zmax);
433433
}
434434
/* }}} */
435435

@@ -441,7 +441,7 @@ ZEND_FRAMELESS_FUNCTION(clamp, 3)
441441
Z_FLF_PARAM_ZVAL(2, zmin);
442442
Z_FLF_PARAM_ZVAL(3, zmax);
443443

444-
php_math_clamp(return_value, zvalue - 3, zmin - 1, zmax - 1);
444+
php_math_clamp(return_value, zvalue, zmax, zmin);
445445
}
446446
/* }}} */
447447

0 commit comments

Comments
 (0)