Skip to content

Commit 901cac3

Browse files
committed
Break both paths
1 parent bae4c1d commit 901cac3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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, zmin, zmax);
444+
php_math_clamp(return_value, zvalue - 3, zmin - 1, zmax - 1);
445445
}
446446
/* }}} */
447447

ext/standard/tests/math/clamp_non_frameless.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ precision=14
55
date.timezone = UTC
66
opcache.enable=1
77
opcache.enable_cli=1
8-
opcache.jit=0 ; disable JIT completely
8+
opcache.jit=0
99
opcache.jit_buffer_size=0
1010
--FILE--
1111
<?php

0 commit comments

Comments
 (0)