mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
Select rand_rangeXX() variant only based on the requested range (#9418)
This fixes an incompatibility when wrapping native 32-bit engines with a userland engine. The latter always used the 64-bit range function which then used two 32-bit numbers from the underlying engine to fill the 64-bit range, whereas the native implementation used only one. Now the selection of the range variant only depends on the requested range. A 32-bit range uses the 32-bit variant (even for 64-bit engines), whereas a larger range uses the 64-bit variant. This was found in https://github.com/php/php-src/pull/9410#discussion_r953213000
This commit is contained in:
@@ -17,6 +17,7 @@ PHP NEWS
|
||||
- Random:
|
||||
. Fixed bug GH-9415 (Randomizer::getInt(0, 2**32 - 1) with Mt19937
|
||||
always returns 1). (timwolla)
|
||||
. Fixed Randomizer::getInt() consistency for 32-bit engines. (timwolla)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug GH-9316 ($http_response_header is wrong for long status line).
|
||||
|
||||
Reference in New Issue
Block a user