svn commit: r224029 -
user/gabor/tre-integration/tools/test/regex/regmatch
Gabor Kovesdan
gabor at FreeBSD.org
Thu Jul 14 18:35:59 UTC 2011
Author: gabor
Date: Thu Jul 14 18:35:59 2011
New Revision: 224029
URL: http://svn.freebsd.org/changeset/base/224029
Log:
- Shift one character forward after matching "" to avoid infinite loop
Modified:
user/gabor/tre-integration/tools/test/regex/regmatch/regmatch.c
Modified: user/gabor/tre-integration/tools/test/regex/regmatch/regmatch.c
==============================================================================
--- user/gabor/tre-integration/tools/test/regex/regmatch/regmatch.c Thu Jul 14 18:11:51 2011 (r224028)
+++ user/gabor/tre-integration/tools/test/regex/regmatch/regmatch.c Thu Jul 14 18:35:59 2011 (r224029)
@@ -42,7 +42,7 @@ main(int argc, char *argv[])
(unsigned long)pmatch.rm_eo);
if (pmatch.rm_eo == len)
break;
- pmatch.rm_so = pmatch.rm_eo;
+ pmatch.rm_so = (pmatch.rm_so == pmatch.rm_eo) ? pmatch.rm_eo + 1 : pmatch.rm_eo;
pmatch.rm_eo = len;
first = false;
}
More information about the svn-src-user
mailing list