[Pcre-svn] [775] code/trunk: Fix bug in experimental convers…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [775] code/trunk: Fix bug in experimental conversion code.
Revision: 775
          http://www.exim.org/viewvc/pcre2?view=rev&revision=775
Author:   ph10
Date:     2017-05-09 11:44:50 +0100 (Tue, 09 May 2017)
Log Message:
-----------
Fix bug in experimental conversion code.


Modified Paths:
--------------
    code/trunk/src/pcre2_convert.c
    code/trunk/testdata/testinput24
    code/trunk/testdata/testoutput24


Modified: code/trunk/src/pcre2_convert.c
===================================================================
--- code/trunk/src/pcre2_convert.c    2017-05-09 08:42:46 UTC (rev 774)
+++ code/trunk/src/pcre2_convert.c    2017-05-09 10:44:50 UTC (rev 775)
@@ -284,7 +284,7 @@
     break;  


     default:
-    if (c < 256 && strchr("\\{}?*+[]()|.^$", c) != NULL)
+    if (c < 256 && strchr("\\{}?*+[]()|", c) != NULL)
       {
       PUTCHARS(STR_BACKSLASH);
       }


Modified: code/trunk/testdata/testinput24
===================================================================
--- code/trunk/testdata/testinput24    2017-05-09 08:42:46 UTC (rev 774)
+++ code/trunk/testdata/testinput24    2017-05-09 10:44:50 UTC (rev 775)
@@ -257,6 +257,10 @@
 \= Expect no match
     a1b


+/how.to/
+
+/^how to/
+
#pattern convert=unset

/abc/

Modified: code/trunk/testdata/testoutput24
===================================================================
--- code/trunk/testdata/testoutput24    2017-05-09 08:42:46 UTC (rev 774)
+++ code/trunk/testdata/testoutput24    2017-05-09 10:44:50 UTC (rev 775)
@@ -411,6 +411,12 @@
     a1b
 No match


+/how.to/
+how.to
+
+/^how to/
+^how to
+
#pattern convert=unset

/abc/