summaryrefslogtreecommitdiff
path: root/src/regenc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-08-07 09:33:20 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-08-07 09:33:20 +0200
commit07b900d0bf8e732a347d27a5936b790a316c3197 (patch)
tree2443bfdda69965757d8ce335cda1a28bb7327834 /src/regenc.c
parent80e416a8ea3bd56ec54a74a93ddc2c61a398679a (diff)
parent1fb4b2b100d76cfa362cd021760b7cc0038cf55d (diff)
Merge branch 'feature/upstream' into develop
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;
}