diff options
Diffstat (limited to 'enc/euc_kr.c')
-rw-r--r-- | enc/euc_kr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/enc/euc_kr.c b/enc/euc_kr.c index 1b5ec893c1..f20a57e69a 100644 --- a/enc/euc_kr.c +++ b/enc/euc_kr.c @@ -145,7 +145,7 @@ euckr_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc) #define euckr_islead(c) ((c) < 0xa1 || (c) == 0xff) static UChar* -euckr_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc) +euckr_left_adjust_char_head(const UChar* start, const UChar* s, const UChar* end, OnigEncoding enc) { /* Assumed in this encoding, mb-trail bytes don't mix with single bytes. @@ -157,7 +157,7 @@ euckr_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc p = s; while (!euckr_islead(*p) && p > start) p--; - len = enclen(enc, p, s); + len = enclen(enc, p, end); if (p + len > s) return (UChar* )p; p += len; return (UChar* )(p + ((s - p) & ~1)); |