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