summaryrefslogtreecommitdiff
path: root/regenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'regenc.c')
-rw-r--r--regenc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/regenc.c b/regenc.c
index abc0c029c8..d345b0f8d5 100644
--- a/regenc.c
+++ b/regenc.c
@@ -968,9 +968,7 @@ onigenc_ascii_only_case_map (OnigCaseFoldType* flagP, const OnigUChar** pp, cons
OnigCaseFoldType flags = *flagP;
int codepoint_length;
- to_end -= 4; /* longest possible length of a single character */
-
- while (*pp<end && to<=to_end) {
+ while (*pp<end && to<to_end) {
codepoint_length = ONIGENC_PRECISE_MBC_ENC_LEN(enc, *pp, end);
if (codepoint_length < 0)
return codepoint_length; /* encoding invalid */