Commits

Bryan O'Sullivan committed ce34807

Fix a nasty off-by-one error.

Comments (0)

Files changed (1)

Data/Text/Search.hs

     swizzle k = 1 `shiftL` (fromIntegral k .&. 0x3f)
     scan !i
         | i > ldiff                  = []
-        | c == z && candidateMatch 0 = i : scan (i + nlast)
+        | c == z && candidateMatch 0 = i : scan (i + nlen)
         | otherwise                  = scan (i + delta)
         where c = hindex (i + nlast)
               candidateMatch !j