Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2011 23:15:15 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225092 - user/gabor/tre-integration/contrib/tre/lib
Message-ID:  <201108222315.p7MNFFNk072339@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gabor
Date: Mon Aug 22 23:15:15 2011
New Revision: 225092
URL: http://svn.freebsd.org/changeset/base/225092

Log:
  - Fix offsets for heuristics with prefix and end segment

Modified:
  user/gabor/tre-integration/contrib/tre/lib/regexec.c

Modified: user/gabor/tre-integration/contrib/tre/lib/regexec.c
==============================================================================
--- user/gabor/tre-integration/contrib/tre/lib/regexec.c	Mon Aug 22 21:10:50 2011	(r225091)
+++ user/gabor/tre-integration/contrib/tre/lib/regexec.c	Mon Aug 22 23:15:15 2011	(r225092)
@@ -221,13 +221,14 @@ tre_match(const tre_tnfa_t *tnfa, const 
 	  /* Look for the end of possibly matching text. */
 	  ret = tre_match_fast(heur->end, string, len - st - n, type,
 			       nmatch, pmatch, eflags);
+	  n += pmatch[0].rm_eo;
 
 	  if (ret != REG_OK)
 	    return ret;
 
 	  SEEK_TO(st);
 
-	  ret = tre_match(tnfa, string, pmatch[0].rm_eo + n,
+	  ret = tre_match(tnfa, string, n,
 			  type, nmatch, pmatch, eflags, NULL, NULL);
 
 	  FIX_OFFSETS;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108222315.p7MNFFNk072339>