summaryrefslogtreecommitdiff
path: root/src/unicode.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-11-08 10:59:08 +0100
committerJörg Frings-Fürst <debian@jff.email>2020-11-08 10:59:08 +0100
commit22bb4b319b3d722ac7bf041a6374cd40afdc4d53 (patch)
treea07d7d0764a8488f4b5ebef1561e2f3d8caacc05 /src/unicode.c
parent0f259c3073f341c48468e80e93731daa31698030 (diff)
parentb4158caf13bc715096c1df7c040c9d25995d76f2 (diff)
Merge branch 'feature/upstream' into develop
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++;
}
}