summaryrefslogtreecommitdiff
path: root/src/iso8859_5.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-04-26 17:40:17 +0200
committerJörg Frings-Fürst <debian@jff.email>2021-04-26 17:40:17 +0200
commit98f7065a3f7b386564840bb5b24b94f9335b2e97 (patch)
tree0bd27b59da70360ac879db886b2cfbf7f2f56e41 /src/iso8859_5.c
parentfc9ba4264eafbb5a6ec0f3cc4cd2e1964c9b8fcf (diff)
New upstream version 6.9.7.1upstream/6.9.7.1
Diffstat (limited to 'src/iso8859_5.c')
-rw-r--r--src/iso8859_5.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/iso8859_5.c b/src/iso8859_5.c
index a5f587c..9e5d418 100644
--- a/src/iso8859_5.c
+++ b/src/iso8859_5.c
@@ -2,7 +2,7 @@
iso8859_5.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2019 K.Kosako
+ * Copyright (c) 2002-2020 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -104,12 +104,16 @@ static const unsigned short EncISO_8859_5_CtypeTable[256] = {
};
static int
-mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
+mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
- *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p);
+ if (CASE_FOLD_IS_NOT_ASCII_ONLY(flag) || ONIGENC_IS_ASCII_CODE(*p))
+ *lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p);
+ else
+ *lower = *p;
+
(*pp)++;
return 1;
}