[project @ 2003-05-22 09:55:56 by simonmar]
authorsimonmar <unknown>
Thu, 22 May 2003 09:55:56 +0000 (09:55 +0000)
committersimonmar <unknown>
Thu, 22 May 2003 09:55:56 +0000 (09:55 +0000)
Commit an off-by-one fix that I forgot about.

Fixes SF bug #741600.

Text/Regex/Posix.hsc

index 506a9ef..865398d 100644 (file)
@@ -106,7 +106,7 @@ matched_parts string p_match = do
   start <- (#peek regmatch_t, rm_so) p_match :: IO CInt
   end   <- (#peek regmatch_t, rm_eo) p_match :: IO CInt
   let s = fromIntegral start; e = fromIntegral end
-  return ( take (s-1) string, 
+  return ( take s string, 
           take (e-s) (drop s string),
           drop e string )