summaryrefslogtreecommitdiff
path: root/src/unicode.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-11-08 10:58:30 +0100
committerJörg Frings-Fürst <debian@jff.email>2020-11-08 10:58:30 +0100
commitfc9ba4264eafbb5a6ec0f3cc4cd2e1964c9b8fcf (patch)
tree465568f63d306c1de9bb8b934b08ee4f033050ad /src/unicode.c
parent6b986090d954dbac91bbb3c43ce7c3328c91a780 (diff)
New upstream version 6.9.6upstream/6.9.6
Diffstat (limited to 'src/unicode.c')
-rw-r--r--src/unicode.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/unicode.c b/src/unicode.c
index 080da74..6703d4b 100644
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -387,15 +387,15 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
for (i = 0; i < ncs[0]; i++) {
for (j = 0; j < ncs[1]; j++) {
for (k = 0; k < ncs[2]; k++) {
+ if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1] &&
+ cs[2][k] == orig_codes[2])
+ continue;
+
items[n].byte_len = lens[2];
items[n].code_len = 3;
items[n].code[0] = cs[0][i];
items[n].code[1] = cs[1][j];
items[n].code[2] = cs[2][k];
- if (items[n].code[0] == orig_codes[0] &&
- items[n].code[1] == orig_codes[1] &&
- items[n].code[2] == orig_codes[2])
- continue;
n++;
}
}
@@ -431,13 +431,12 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
for (i = 0; i < ncs[0]; i++) {
for (j = 0; j < ncs[1]; j++) {
+ if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1])
+ continue;
items[n].byte_len = lens[1];
items[n].code_len = 2;
items[n].code[0] = cs[0][i];
items[n].code[1] = cs[1][j];
- if (items[n].code[0] == orig_codes[0] &&
- items[n].code[1] == orig_codes[1])
- continue;
n++;
}
}