@@ -267,6 +267,7 @@ streamDecodeUtf8With onErr = decodeChunk B.empty 0 0
267 UTF8_REJECT -> do
267 UTF8_REJECT -> do
268 -- We encountered an encoding error
268 -- We encountered an encoding error
269 x <- peek curPtr'
269 x <- peek curPtr'
270 case onErr desc (Just x) of
271 case onErr desc (Just x) of
271 Nothing -> loop $ curPtr' `plusPtr` 1
272 Nothing -> loop $ curPtr' `plusPtr` 1
272 Just c -> do
273 Just c -> do
@@ -274,7 +275,6 @@ streamDecodeUtf8With onErr = decodeChunk B.empty 0 0
274 w <- unsafeSTToIO $
275 w <- unsafeSTToIO $
275 unsafeWrite dest (fromIntegral destOff) (safe c)
276 unsafeWrite dest (fromIntegral destOff) (safe c)
276 poke destOffPtr (destOff + fromIntegral w)
277 poke destOffPtr (destOff + fromIntegral w)
278 loop $ curPtr' `plusPtr` 1
278 loop $ curPtr' `plusPtr` 1