From 41e872f9b8fa9e61607e13077b2a3817f7310c09 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 22 May 2003 09:55:56 +0000 Subject: [PATCH] [project @ 2003-05-22 09:55:56 by simonmar] Commit an off-by-one fix that I forgot about. Fixes SF bug #741600. --- Text/Regex/Posix.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) -- 1.7.10.4