Skip to content

Commit 7716391

Browse files
committed
asdfgh
1 parent 9df6590 commit 7716391

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ext/standard/array.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,12 +2876,12 @@ PHP_FUNCTION(array_fill_keys)
28762876
#define RANGE_CHECK_LONG_INIT_ARRAY(start, end, _step) do { \
28772877
zend_ulong __calc_size = ((zend_ulong) start - end) / (_step); \
28782878
if (__calc_size >= HT_MAX_SIZE - 1) { \
2879-
zend_ulong __excess = __calc_size - (HT_MAX_SIZE - 1); \
2879+
uint64_t __excess = __calc_size - (HT_MAX_SIZE - 1); \
28802880
zend_value_error(\
2881-
"The supplied range exceeds the maximum array size by %lu elements: " \
2881+
"The supplied range exceeds the maximum array size by %" PRIu64 " elements: " \
28822882
"start=" ZEND_LONG_FMT ", end=" ZEND_LONG_FMT ", step=" ZEND_LONG_FMT ". " \
2883-
"Calculated size: " ZEND_LONG_FMT ", Maximum size: " ZEND_LONG_FMT ".", \
2884-
__excess, end, start, (_step), __calc_size + 1, (zend_ulong)HT_MAX_SIZE); \
2883+
"Calculated size: %" PRIu64 ", Maximum size: %" PRIu64 ".", \
2884+
__excess, end, start, (_step), (uint64_t)__calc_size, (uint64_t)HT_MAX_SIZE); \
28852885
RETURN_THROWS(); \
28862886
} \
28872887
size = (uint32_t)(__calc_size + 1); \

ext/standard/tests/array/range/range_inputs_float_small_step_exhaustion.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ try {
1414
}
1515
?>
1616
--EXPECTF--
17-
The supplied range exceeds the maximum array size: start=0.0 end=100000000000.0 step=0.1
18-
The supplied range exceeds the maximum array size: start=-%d end=%d step=1
17+
The supplied range exceeds the maximum array size by %f elements: start=0.0, end=%f, step=0.1. Max size: %d
18+
The supplied range exceeds the maximum array size by %f elements: start=-%f, end=%f, step=1. Calculated size: %d, Maximum size: %d.

0 commit comments

Comments
 (0)