From 3af4733e60f956bd8673b419d3a9e83fcd0a0b8e Mon Sep 17 00:00:00 2001 From: Hanaasagi Date: Mon, 12 Jun 2023 15:34:36 +0900 Subject: [PATCH] fix: keep the order when filling random bytes --- src/timestamp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timestamp.rs b/src/timestamp.rs index e49771d2..e605b63e 100644 --- a/src/timestamp.rs +++ b/src/timestamp.rs @@ -232,7 +232,7 @@ pub(crate) const fn encode_unix_timestamp_millis(millis: u64, random_bytes: &[u8 let millis_low = (millis & 0xFFFF) as u16; let random_and_version = - (random_bytes[0] as u16 | ((random_bytes[1] as u16) << 8) & 0x0FFF) | (0x7 << 12); + (random_bytes[1] as u16 | ((random_bytes[0] as u16) << 8) & 0x0FFF) | (0x7 << 12); let mut d4 = [0; 8];