on master help sign in
Fix bounds check in copy code

--HG-- extra : convert_revision : 529b86485a4031695ae5742b1e85790362707a16

commit2d7ca1dc6583dcc8986dc1c14a1b2321e6c99807 authorBryan O'Sullivan <bos@serpentine.com> dateFri 30 Jan 2009, 23:28 (18 years ago) parent4dd8b72
1 file changed+1−1
Data/Text/Fusion.hs+1−1
Data/Text/Fusion.hs+1−1
@@ -168,7 +168,7 @@ copy src dest = copy_loop 0
168168 where
169169 len = A.length src
170170 copy_loop i
171− | i > len = return ()
171+ | i >= len = return ()
172172 | otherwise = do A.unsafeRead src i >>= A.unsafeWrite dest i
173173 copy_loop (i+1)
174174