diff options
Diffstat (limited to 'lib/KeyDB.hs')
-rw-r--r-- | lib/KeyDB.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/KeyDB.hs b/lib/KeyDB.hs index c92f614..fd0a9ce 100644 --- a/lib/KeyDB.hs +++ b/lib/KeyDB.hs | |||
@@ -71,7 +71,11 @@ newtype KeyGrip = KeyInt Int | |||
71 | 71 | ||
72 | fingerprintGrip :: Fingerprint -> KeyGrip | 72 | fingerprintGrip :: Fingerprint -> KeyGrip |
73 | fingerprintGrip (Fingerprint bs) = | 73 | fingerprintGrip (Fingerprint bs) = |
74 | case decode $ L.fromStrict $ S.drop (S.length bs - sizeOf (0::Int)) bs of | 74 | -- case decode $ L.fromStrict $ S.drop (S.length bs - sizeOf (0::Int)) bs of |
75 | -- -- The above was removed because Int is encoded as 8 bytes even when we are | ||
76 | -- -- using 32-bit GHC. | ||
77 | -- Presumably, the extra 4 bytes will be truncated. | ||
78 | case decode $ L.fromStrict $ S.drop (S.length bs - 8) bs of | ||
75 | i -> KeyInt i | 79 | i -> KeyInt i |
76 | 80 | ||
77 | smallprGrip :: String -> Maybe KeyGrip | 81 | smallprGrip :: String -> Maybe KeyGrip |