File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
core/src/Streamly/Internal/Data/MutArray Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ unsafeSnoc, snocUnsafe :: MonadIO m => MutArray a -> a -> m (MutArray a)
422422unsafeSnoc arr@ MutArray {.. } a = do
423423 assert (arrEnd < arrCapacity) (return () )
424424 let arr1 = arr {arrEnd = arrEnd + 1 }
425- unsafePutIndex arrEnd arr1 a
425+ unsafePutIndex ( length arr) arr1 a
426426 return arr1
427427
428428-- NOINLINE to move it out of the way and not pollute the instruction cache.
@@ -784,7 +784,7 @@ chunksOf n (D.Stream step state) =
784784 putIndexUnsafeWith end contents x
785785 let end1 = end + 1
786786 return $
787- if start + end1 >= bound
787+ if end1 >= bound
788788 then D. Skip
789789 (GroupYield
790790 contents start end1 bound (GroupStart s))
You can’t perform that action at this time.
0 commit comments