From: simonmar Date: Thu, 22 May 2003 09:55:56 +0000 (+0000) Subject: [project @ 2003-05-22 09:55:56 by simonmar] X-Git-Tag: nhc98-1-18-release~638 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=41e872f9b8fa9e61607e13077b2a3817f7310c09;p=haskell-directory.git [project @ 2003-05-22 09:55:56 by simonmar] Commit an off-by-one fix that I forgot about. Fixes SF bug #741600. --- diff --git a/Text/Regex/Posix.hsc b/Text/Regex/Posix.hsc index 506a9ef..865398d 100644 --- a/Text/Regex/Posix.hsc +++ b/Text/Regex/Posix.hsc @@ -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 )