diff options
Diffstat (limited to 'src/3rdparty/pcre2/src/pcre2_maketables.c')
-rw-r--r-- | src/3rdparty/pcre2/src/pcre2_maketables.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdparty/pcre2/src/pcre2_maketables.c b/src/3rdparty/pcre2/src/pcre2_maketables.c index 56d2494023..ac8b63b809 100644 --- a/src/3rdparty/pcre2/src/pcre2_maketables.c +++ b/src/3rdparty/pcre2/src/pcre2_maketables.c @@ -52,8 +52,6 @@ PCRE2_DFTABLES is defined. */ # include "pcre2_internal.h" #endif - - /************************************************* * Create PCRE2 character tables * *************************************************/ @@ -98,7 +96,11 @@ for (i = 0; i < 256; i++) *p++ = tolower(i); /* Next the case-flipping table */ -for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); +for (i = 0; i < 256; i++) + { + int c = islower(i)? toupper(i) : tolower(i); + *p++ = (c < 256)? c : i; + } /* Then the character class tables. Don't try to be clever and save effort on exclusive ones - in some locales things may be different. |