Skip to content

Commit

Permalink
Merge pull request #682 from Hanaasagi/fix-index
Browse files Browse the repository at this point in the history
fix: keep the order when filling random bytes
  • Loading branch information
KodrAus authored Jun 13, 2023
2 parents 6188ecf + 3af4733 commit 4297536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 4297536

Please sign in to comment.