summaryrefslogtreecommitdiff
path: root/src/utf32_le.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utf32_le.c')
-rw-r--r--src/utf32_le.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utf32_le.c b/src/utf32_le.c
index a5a048e..33200d1 100644
--- a/src/utf32_le.c
+++ b/src/utf32_le.c
@@ -36,6 +36,12 @@ utf32le_mbc_enc_len(const UChar* p ARG_UNUSED)
}
static int
+is_valid_mbc_string(const UChar* s, const UChar* end)
+{
+ return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_UTF32_LE, s, end);
+}
+
+static int
utf32le_is_mbc_newline(const UChar* p, const UChar* end)
{
if (p + 3 < end) {
@@ -183,5 +189,6 @@ OnigEncodingType OnigEncodingUTF32_LE = {
utf32le_left_adjust_char_head,
onigenc_always_false_is_allowed_reverse_match,
NULL, /* init */
- NULL /* is_initialized */
+ NULL, /* is_initialized */
+ is_valid_mbc_string
};