Commit 18424164 authored by Tom Ellis's avatar Tom Ellis
Browse files

Don't leak space when passing the undecoded portion to the next iteration.

parent 0fdeebd4
......@@ -286,7 +286,7 @@ streamDecodeUtf8With onErr = decodeChunk B.empty 0 0
return $! text arr 0 (fromIntegral n)
lastPtr <- peek curPtrPtr
let left = lastPtr `minusPtr` curPtr
undecoded = case state of
!undecoded = case state of
UTF8_ACCEPT -> B.empty
_ -> B.append undecoded0 (B.drop left bs)
return $ Some chunkText undecoded
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment