summaryrefslogtreecommitdiff
path: root/enc/utf_16be.c
diff options
context:
space:
mode:
Diffstat (limited to 'enc/utf_16be.c')
-rw-r--r--enc/utf_16be.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/enc/utf_16be.c b/enc/utf_16be.c
index 8d7c8e9..2868989 100644
--- a/enc/utf_16be.c
+++ b/enc/utf_16be.c
@@ -103,9 +103,15 @@ utf16be_is_mbc_newline(const UChar* p, const UChar* end,
static OnigCodePoint
utf16be_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED,
+ int *precise_ret,
OnigEncoding enc)
{
OnigCodePoint code;
+ int ret;
+
+ ret = utf16be_mbc_enc_len(p, end, enc);
+ if (precise_ret)
+ *precise_ret = ret;
if (UTF16_IS_SURROGATE_FIRST(*p)) {
code = ((((p[0] - 0xd8) << 2) + ((p[1] & 0xc0) >> 6) + 1) << 16)