svn commit: r226233 - user/gabor/grep/trunk/regex

Gabor Kovesdan gabor at FreeBSD.org
Mon Oct 10 20:57:54 UTC 2011


Author: gabor
Date: Mon Oct 10 20:57:54 2011
New Revision: 226233
URL: http://svn.freebsd.org/changeset/base/226233

Log:
  - Fix a bug in handling a single dot pattern
  
  Submitted by:	Nali Toja <nalitoja at gmail.com>

Modified:
  user/gabor/grep/trunk/regex/tre-fastmatch.c

Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c
==============================================================================
--- user/gabor/grep/trunk/regex/tre-fastmatch.c	Mon Oct 10 20:54:20 2011	(r226232)
+++ user/gabor/grep/trunk/regex/tre-fastmatch.c	Mon Oct 10 20:57:54 2011	(r226233)
@@ -546,7 +546,7 @@ tre_compile_fast(fastmatch_t *fg, const 
 		 int cflags)
 {
   tre_char_t *tmp;
-  size_t pos = 0, hasdot = 0, whasdot = 0;;
+  size_t pos = 0, hasdot = 0, whasdot = 0;
   ssize_t firstdot = -1, wfirstdot = -1;
   bool escaped = false;
   bool *_escmap = NULL;
@@ -692,7 +692,7 @@ badpat:
       return REG_BADPAT;
     }
 
-  fg->hasdot = whasdot;
+  fg->hasdot = wfirstdot > -1;
 
   /*
    * The pattern has been processed and copied to tmp as a literal string


More information about the svn-src-user mailing list