We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffde843 commit 96cc29cCopy full SHA for 96cc29c
Sources/FoundationEssentials/UUID.swift
@@ -92,7 +92,7 @@ public struct UUID : Hashable, Equatable, CustomStringConvertible, Sendable {
92
var secondBits = second
93
94
// Set the version to 4 (0100 in binary)
95
- firstBits &= 0xFFFFFFFFFFFF0FFF // Clear the last 12 bits
+ firstBits &= 0xFFFFFFFFFFFF0FFF // Clear bits 48 through 51
96
firstBits |= 0x0000000000004000 // Set the version bits to '0100' at the correct position
97
98
// Set the variant to '10' (RFC9562 variant)
0 commit comments