summaryrefslogtreecommitdiffstats
path: root/thirdparty/pcre2/src/pcre2_maketables.c
diff options
context:
space:
mode:
authorJakub Marcowski <chubercikbattle@gmail.com>2024-03-11 03:15:07 +0100
committerJakub Marcowski <chubercikbattle@gmail.com>2024-03-11 11:42:02 +0100
commitdab95993c6c8ebd4fb439385a892dabda22698a2 (patch)
tree98084c35eb94c5ab63c7be5d564251b3d18dc70d /thirdparty/pcre2/src/pcre2_maketables.c
parent810f127022ec2cbfb288e436151d1a777c7b5da7 (diff)
downloadredot-engine-dab95993c6c8ebd4fb439385a892dabda22698a2.tar.gz
pcre2: Update to 10.43
Diffstat (limited to 'thirdparty/pcre2/src/pcre2_maketables.c')
-rw-r--r--thirdparty/pcre2/src/pcre2_maketables.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/thirdparty/pcre2/src/pcre2_maketables.c b/thirdparty/pcre2/src/pcre2_maketables.c
index 56d2494023..ac8b63b809 100644
--- a/thirdparty/pcre2/src/pcre2_maketables.c
+++ b/thirdparty/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.