Skip to content

Commit c2517bd

Browse files
committed
Revert "Fix bounds check in cloneM"
This reverts commit 2a648ca81f842374c16a83945994027ff65e140f.
1 parent dd7fca9 commit c2517bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/HashMap/Internal/Array.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ copyM !src !_sidx@(I# sidx#) !dst !_didx@(I# didx#) _n@(I# n#) =
347347

348348
cloneM :: MArray s a -> Int -> Int -> ST s (MArray s a)
349349
cloneM _mary@(MArray mary#) _off@(I# off#) _len@(I# len#) =
350-
CHECK_BOUNDS("cloneM_off", lengthM _mary, _off)
350+
CHECK_BOUNDS("cloneM_off", lengthM _mary, _off - 1)
351351
CHECK_BOUNDS("cloneM_end", lengthM _mary, _off + _len - 1)
352352
ST $ \ s ->
353353
case cloneMutableArray# mary# off# len# s of

0 commit comments

Comments
 (0)