Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2011 20:57:54 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r226233 - user/gabor/grep/trunk/regex
Message-ID:  <201110102057.p9AKvsCB082347@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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



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