diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-10-12 16:35:29 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-10-12 16:35:29 +0000 |
commit | b97ccbccda36682d7b0ed61cfb8e923f9dfc7be3 (patch) | |
tree | c79335ac9367640d9f35eb9cbca00833f99c7fad | |
parent | d1d32f0c599b68687bc3a52d042bf518435962b6 (diff) | |
download | pcre-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-- | ChangeLog | 4 | ||||
-rw-r--r-- | pcretest.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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 @@ -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; |