summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-10-12 16:35:29 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-10-12 16:35:29 +0000
commitb97ccbccda36682d7b0ed61cfb8e923f9dfc7be3 (patch)
treec79335ac9367640d9f35eb9cbca00833f99c7fad
parentd1d32f0c599b68687bc3a52d042bf518435962b6 (diff)
downloadpcre-b97ccbccda36682d7b0ed61cfb8e923f9dfc7be3.tar.gz
Fix ASCII dependency in pcretest when decoding hex characters.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@734 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog4
-rw-r--r--pcretest.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e0750b..7495a54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -103,6 +103,10 @@ Version 8.20 10-Oct-2011
19. If the PCRE_NO_START_OPTIMIZE option was set for pcre_compile(), it did not
suppress the check for a minimum subject length at run time. (If it was
given to pcre_exec() or pcre_dfa_exec() it did work.)
+
+20. Fixed an ASCII-dependent infelicity in pcretest that would have made it
+ fail to work when decoding hex characters in data strings in EBCDIC
+ environments.
Version 8.13 16-Aug-2011
diff --git a/pcretest.c b/pcretest.c
index fa9379d..6aac2c2 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -2347,7 +2347,7 @@ while (!done)
unsigned char *pt = p;
c = 0;
while (isxdigit(*(++pt)))
- c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'W');
+ c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'a' - 10);
if (*pt == '}')
{
unsigned char buff8[8];
@@ -2377,7 +2377,7 @@ while (!done)
c = 0;
while (i++ < 2 && isxdigit(*p))
{
- c = c * 16 + tolower(*p) - ((isdigit(*p))? '0' : 'W');
+ c = c * 16 + tolower(*p) - ((isdigit(*p))? '0' : 'a' - 10);
p++;
}
break;