From aed56786e16106646d64dcfdf231c70ebd91c9f5 Mon Sep 17 00:00:00 2001 From: Beau Simensen Date: Wed, 27 Aug 2014 14:59:52 -0500 Subject: [PATCH] Correct upper range for mt_rand. --- src/Uuid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uuid.php b/src/Uuid.php index a1f7bed..be9e82c 100644 --- a/src/Uuid.php +++ b/src/Uuid.php @@ -1226,7 +1226,7 @@ final class Uuid $bytes = ''; foreach (range(1, $length) as $i) { - $bytes = chr(mt_rand(0, 256)) . $bytes; + $bytes = chr(mt_rand(0, 255)) . $bytes; } return $bytes;