This commit is contained in:
Adithya Kumar 2023-08-20 17:26:38 +05:30
parent 94a0638ca3
commit 6daa9b3a5d

View File

@ -206,8 +206,7 @@ checkTagRF ::
-> MutableByteArray -> MutableByteArray
-> IO (Int, Maybe a) -> IO (Int, Maybe a)
checkTagRF tagVal tagLen finalOff backOff tagOff arr = do checkTagRF tagVal tagLen finalOff backOff tagOff arr = do
res <- Array.asPtrUnsafe slice $ \ptr -> memcmp1 ptr tagVal tagLen case memcmpCStr tagVal arr tagOff tagLen of
case res of
EQ -> EQ ->
let newOff = afterTagOff + 4 let newOff = afterTagOff + 4
in fmap Just <$> deserialize newOff arr in fmap Just <$> deserialize newOff arr