diff --git a/persist.cabal b/persist.cabal
--- a/persist.cabal
+++ b/persist.cabal
@@ -1,5 +1,5 @@
 name:                   persist
-version:                0.1.1.0
+version:                0.1.1.1
 license:                BSD3
 license-file:           LICENSE
 author:                 Daniel Mendler <mail@daniel-mendler.de>,
diff --git a/src/Data/Persist.hs b/src/Data/Persist.hs
--- a/src/Data/Persist.hs
+++ b/src/Data/Persist.hs
@@ -572,7 +572,7 @@
                 z <- xor 0x80 <$> byte
                 pure $ z .|. shiftL6 (y .|. shiftL6
                                        (x .|. shiftL6 (xor 0xf0 w)))
-    if r < 0x10FFFF then
+    if r <= 0x10FFFF then
       pure $ unsafeChr r
     else
       fail "Invalid character"
