diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## Zip 0.1.8
+
+* Fixed a bug that caused `zip` to write incorrect number of entries
+  (instead of `0xffff`) in central directory when Zip64 feature is enabled.
+
 ## Zip 0.1.7
 
 * Fix literal overflows on 32 bit systems.
diff --git a/Codec/Archive/Zip/Internal.hs b/Codec/Archive/Zip/Internal.hs
--- a/Codec/Archive/Zip/Internal.hs
+++ b/Codec/Archive/Zip/Internal.hs
@@ -871,9 +871,10 @@
 
 withSaturation :: forall a b. (Integral a, Integral b, Bounded b) => a -> b
 withSaturation x =
-  if fromIntegral x > (maxBound :: b)
-    then maxBound :: b
+  if (fromIntegral x :: Integer) > (fromIntegral bound :: Integer)
+    then bound
     else fromIntegral x
+  where bound = maxBound :: b
 
 -- | Determine target entry of action.
 
diff --git a/zip.cabal b/zip.cabal
--- a/zip.cabal
+++ b/zip.cabal
@@ -31,7 +31,7 @@
 -- POSSIBILITY OF SUCH DAMAGE.
 
 name:                 zip
-version:              0.1.7
+version:              0.1.8
 cabal-version:        >= 1.10
 license:              BSD3
 license-file:         LICENSE.md
@@ -106,7 +106,7 @@
                     , text             >= 0.2     && < 1.3
                     , time             >= 1.4     && < 1.8
                     , transformers     >= 0.4     && < 0.6
-                    , zip              >= 0.1.7
+                    , zip              >= 0.1.8
   default-language:   Haskell2010
 
 source-repository head
