]> granicus.if.org Git - onig/commitdiff
add string terminator zero sequence in init() of utf16be
authorK.Kosako <kosako@sofnec.co.jp>
Mon, 26 Feb 2018 07:44:46 +0000 (16:44 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Mon, 26 Feb 2018 07:44:46 +0000 (16:44 +0900)
src/utf16_be.c

index 931d63dc93884a4079fe2481b4fd5e274bc575b4..a4a00ed9625c084d7ea3c0763ae1a54fe2a92188 100644 (file)
@@ -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 */