[Pcre-svn] [1605] code/trunk: Fix [:punct:] bug in UCP mode …

Inizio della pagina
Delete this message
Autore: Subversion repository
Data:  
To: pcre-svn
Oggetto: [Pcre-svn] [1605] code/trunk: Fix [:punct:] bug in UCP mode (interpreter only).
Revision: 1605
          http://vcs.pcre.org/viewvc?view=rev&revision=1605
Author:   ph10
Date:     2015-11-17 17:53:37 +0000 (Tue, 17 Nov 2015)
Log Message:
-----------
Fix [:punct:] bug in UCP mode (interpreter only). 


Modified Paths:
--------------
    code/trunk/pcre_xclass.c
    code/trunk/testdata/testinput6
    code/trunk/testdata/testoutput6


Modified: code/trunk/pcre_xclass.c
===================================================================
--- code/trunk/pcre_xclass.c    2015-11-17 17:27:17 UTC (rev 1604)
+++ code/trunk/pcre_xclass.c    2015-11-17 17:53:37 UTC (rev 1605)
@@ -246,7 +246,7 @@


       case PT_PXPUNCT:
       if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P ||
-            (c < 256 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
+            (c < 128 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
         return !negated;
       break;



Modified: code/trunk/testdata/testinput6
===================================================================
--- code/trunk/testdata/testinput6    2015-11-17 17:27:17 UTC (rev 1604)
+++ code/trunk/testdata/testinput6    2015-11-17 17:53:37 UTC (rev 1605)
@@ -1505,4 +1505,8 @@
 /[\pS#moq]/
     =


+/[[:punct:]]/8W
+    \xc2\xb4
+    \x{b4} 
+
 /-- End of testinput6 --/


Modified: code/trunk/testdata/testoutput6
===================================================================
--- code/trunk/testdata/testoutput6    2015-11-17 17:27:17 UTC (rev 1604)
+++ code/trunk/testdata/testoutput6    2015-11-17 17:53:37 UTC (rev 1605)
@@ -2473,4 +2473,10 @@
     =
  0: =


+/[[:punct:]]/8W
+    \xc2\xb4
+No match
+    \x{b4} 
+No match
+
 /-- End of testinput6 --/