Subject: bug#17447: closed (Re: bug#17447: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte flag is on or off)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 09 May 2014 19:45:03 +0000

Your bug report

#17447: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte flag is on or off

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17447: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17447
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17447: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte flag is on or off
From: Paul Eggert <[email-masked]>
To: Norihiro Tanaka <[email-masked]>, [email-masked]
Date: Fri, 09 May 2014 12:43:57 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Norihiro Tanaka wrote:
> When multibyte flag is on, exit condition is `p >= end'.  OTOH, when off,
> it's `p > end'.  I think that the later is right, and fix the former.

Thanks, I installed that.

Subject: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte flag is on or off
From: Norihiro Tanaka <[email-masked]>
To: [email-masked]
Date: Fri, 09 May 2014 23:18:36 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

When multibyte flag is on, exit condition is `p >= end'.  OTOH, when off,
it's `p > end'.  I think that the later is right, and fix the former.
From 052f4b7c671bfe5221caf687e819d635d9513147 Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <[email-masked]>
Date: Fri, 9 May 2014 15:28:38 +0900
Subject: [PATCH] dfa: fix mismatch of exit conditions due to whether multibyte
 flag is on or off

* src/dfa.c (dfaexec): Fix it.
---
 src/dfa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dfa.c b/src/dfa.c
index fc6ce72..2a326e6 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3318,7 +3318,7 @@ dfaexec (struct dfa *d, char const *begin, char *end,
                                          end - (char const *) mbp, d);
                   p = mbp;
 
-                  if ((char *) p >= end)
+                  if ((char *) p > end)
                     {
                       p = NULL;
                       goto done;
-- 
1.9.2