summaryrefslogtreecommitdiff
path: root/lib/OpenPGP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/OpenPGP.hs')
-rw-r--r--lib/OpenPGP.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/OpenPGP.hs b/lib/OpenPGP.hs
index 4889a23..e5b70cd 100644
--- a/lib/OpenPGP.hs
+++ b/lib/OpenPGP.hs
@@ -357,7 +357,7 @@ instance Binary MPI where
357 put (((fromIntegral . LZ.length $ bytes) - 1) * 8 357 put (((fromIntegral . LZ.length $ bytes) - 1) * 8
358 + floor (logBase 2 $ fromIntegral (bytes `LZ.index` 0)) 358 + floor (logBase 2 $ fromIntegral (bytes `LZ.index` 0))
359 + 1 :: Word16) 359 + 1 :: Word16)
360 mapM_ (\x -> putWord8 x) (LZ.unpack bytes) 360 mapM_ putWord8 (LZ.unpack bytes)
361 where bytes = LZ.unfoldr (\x -> if x == 0 then Nothing 361 where bytes = LZ.unfoldr (\x -> if x == 0 then Nothing
362 else Just (fromIntegral x, x `shiftR` 8)) i 362 else Just (fromIntegral x, x `shiftR` 8)) i
363 get = do 363 get = do