1. Bryan O'Sullivan
  2. text

Commits

Nicolas Pouillard  committed 552c50b

Data.Text: fix a bug in drop.

  • Participants
  • Parent commits ef3e373
  • Branches default

Comments (0)

Files changed (1)

File Data/Text.hs

View file
     | otherwise = loop 0 0
   where end = off + len
         loop !i !cnt
-            | i >= end || cnt >= n   = Text arr (off+i) (len-i)
+            | i >= len || cnt >= n   = Text arr (off+i) (len-i)
             | otherwise              = loop (i+d) (cnt+1)
             where d = iter_ t i
 {-# INLINE [1] drop #-}