From 423313a537752ca82c89eef303686d88b96376f1 Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Wed, 1 Nov 2023 14:14:27 +0300 Subject: [PATCH] Fixed UnixTimeGenerator collisions Closes #518 See https://github.com/symfony/symfony/pull/52367 --- src/Generator/UnixTimeGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator/UnixTimeGenerator.php b/src/Generator/UnixTimeGenerator.php index af94decf..d7c8ed4e 100644 --- a/src/Generator/UnixTimeGenerator.php +++ b/src/Generator/UnixTimeGenerator.php @@ -142,7 +142,7 @@ private function increment(): string self::$seedIndex = 21; } - self::$rand[5] = 0xffff & $carry = self::$rand[5] + (self::$seedParts[self::$seedIndex--] & 0xffffff); + self::$rand[5] = 0xffff & $carry = self::$rand[5] + 1 + (self::$seedParts[self::$seedIndex--] & 0xffffff); self::$rand[4] = 0xffff & $carry = self::$rand[4] + ($carry >> 16); self::$rand[3] = 0xffff & $carry = self::$rand[3] + ($carry >> 16); self::$rand[2] = 0xffff & $carry = self::$rand[2] + ($carry >> 16);