Date: Thu, 14 Jul 2011 18:35:59 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r224029 - user/gabor/tre-integration/tools/test/regex/regmatch Message-ID: <201107141835.p6EIZx7C040880@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107141835.p6EIZx7C040880>