on master help sign in
fix bit-shifting in V1 generation
commitcb4b691ee1fb4aeeb5b741d3ade5994b4ba119b3 authoraslatter <aslatter@gmail.com> dateThu 2 Oct 2008, 05:31 (18 years ago) parent817ec9d
1 file changed+1−1
Data/UUID/V1.hs+1−1
Data/UUID/V1.hs+1−1
@@ -56,7 +56,7 @@ word64ToTimePieces :: Word64 -> (Word32, Word16, Word16)
5656word64ToTimePieces w = (lo, mi, hi)
5757 where
5858 lo = fromIntegral $ (w `shiftL` 32) `shiftR` 32
59− mi = fromIntegral $ (w `shiftL` 16) `shiftR` 32
59+ mi = fromIntegral $ (w `shiftL` 16) `shiftR` 48
6060 hi = (fromIntegral $ w `shiftR` 48) `setBit` 15
6161
6262