mirror of
https://github.com/composewell/streamly.git
synced 2024-09-11 11:37:22 +03:00
Fix the bug in Serialize.decode
This commit is contained in:
parent
aefdc8411d
commit
e7b21daabe
@ -260,6 +260,6 @@ pinnedEncode = encodeAs Pinned
|
||||
decode :: Serialize a => Array Word8 -> a
|
||||
decode arr@(Array {..}) = unsafeInlineIO $ do
|
||||
let lenArr = Array.length arr
|
||||
(off, val) <- deserialize 0 arrContents lenArr
|
||||
(off, val) <- deserialize arrStart arrContents (arrStart + lenArr)
|
||||
assertM(lenArr == off)
|
||||
pure val
|
||||
|
Loading…
Reference in New Issue
Block a user