summaryrefslogtreecommitdiff
path: root/src/regenc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-08-07 09:32:48 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-08-07 09:32:48 +0200
commit40f3d0030e6e98bcb02d6523e5ee48497dec49a6 (patch)
treea992f9a6acd3edc2c7bb6b1aba2e52084918c9ab /src/regenc.c
parente25c754918ae26e8b9e68a47bc1af36248e91800 (diff)
New upstream version 6.9.3upstream/6.9.3
Diffstat (limited to 'src/regenc.c')
-rw-r--r--src/regenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/regenc.c b/src/regenc.c
index 6376565..9fab721 100644
--- a/src/regenc.c
+++ b/src/regenc.c
@@ -853,6 +853,8 @@ onigenc_mbn_is_mbc_ambiguous(OnigEncoding enc, OnigCaseFoldType flag,
extern int
onigenc_mb2_code_to_mbclen(OnigCodePoint code)
{
+ if ((code & (~0xffff)) != 0) return ONIGERR_INVALID_CODE_POINT_VALUE;
+
if ((code & 0xff00) != 0) return 2;
else return 1;
}