Skip to content

Commit a499c4c

Browse files
committed
Fix object support for frameless clamp function
1 parent 7205c08 commit a499c4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/standard/math.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,14 @@ ZEND_FRAMELESS_FUNCTION(clamp, 3)
451451
}
452452

453453
if (zend_compare(zmax, zvalue) == -1) {
454-
RETURN_COPY_VALUE(zmax);
454+
RETURN_COPY(zmax);
455455
}
456456

457457
if (zend_compare(zvalue, zmin) == -1) {
458-
RETURN_COPY_VALUE(zmin);
458+
RETURN_COPY(zmin);
459459
}
460460

461-
RETURN_COPY_VALUE(zvalue);
461+
RETURN_COPY(zvalue);
462462
}
463463
/* }}} */
464464

ext/standard/tests/math/clamp.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ float(2.5)
4949
float(2.5)
5050
float(1.3)
5151
float(3.141592653589793)
52-
double(NAN)
52+
float(NAN)
5353
string(1) "c"
5454
string(1) "d"
5555
2025-08-15

0 commit comments

Comments
 (0)