From 05c269cf22c9b4b807ca858578a6cd043f021bbb Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Mon, 26 Feb 2018 16:44:46 +0900 Subject: [PATCH] add string terminator zero sequence in init() of utf16be --- src/utf16_be.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/utf16_be.c b/src/utf16_be.c index 931d63d..a4a00ed 100644 --- a/src/utf16_be.c +++ b/src/utf16_be.c @@ -46,12 +46,13 @@ init(void) enc = ONIG_ENCODING_UTF16_BE; t_int = ONIG_TYPE_INT; - name = "\000F\000A\000I\000L"; BC0_P(name, fail); - name = "\000S\000U\000C\000C\000E\000S\000S"; BC0_P(name, success); - name = "\000A\000B\000O\000R\000T"; BC0_P(name, abort); - name = "\000E\000R\000R\000O\000R"; BC1_P(name, error, &t_int); - name = "\000C\000O\000U\000N\000T"; BC0_P(name, count); - name = "\000F\000A\000I\000L\000_\000C\000O\000U\000N\000T"; BC0_R(name, count); + name = "\000F\000A\000I\000L\000\000"; BC0_P(name, fail); + name = "\000S\000U\000C\000C\000E\000S\000S\000\000"; BC0_P(name, success); + name = "\000A\000B\000O\000R\000T\000\000"; BC0_P(name, abort); + name = "\000E\000R\000R\000O\000R\000\000"; BC1_P(name, error, &t_int); + name = "\000C\000O\000U\000N\000T\000\000"; BC0_P(name, count); + name = "\000F\000A\000I\000L\000_\000C\000O\000U\000N\000T\000\000"; + BC0_R(name, count); #endif /* USE_CALLOUT */ -- 2.40.0