From 115afec3199426e9c3cec469079b884724d92bc1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 9 Jan 1998 22:59:31 +0000 Subject: [PATCH] (Fmake_category_set): Don't allow multibyte string. (describe_category): Pass new args to insert_from_string. (describe_category_1): Likewise. --- src/category.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/category.c b/src/category.c index 94739b0eff7..8e6097258de 100644 --- a/src/category.c +++ b/src/category.c @@ -63,6 +63,9 @@ CATEGORIES is a string of category mnemonics.") CHECK_STRING (categories, 0); val = MAKE_CATEGORY_SET; + if (STRING_MULTIBYTE (categories)) + error ("Multibyte string in make-category-set"); + len = XSTRING (categories)->size; while (--len >= 0) { @@ -486,7 +489,8 @@ describe_category (value) } mnemonics = Fcategory_set_mnemonics (value); - insert_from_string (mnemonics, 0, XSTRING (mnemonics)->size, 0); + insert_from_string (mnemonics, 0, 0, XSTRING (mnemonics)->size, + XSTRING (mnemonics)->size_byte, 0); insert_string ("\n"); return; } @@ -519,7 +523,8 @@ describe_category_1 (vector) insert_char (i + 32); insert (": ", 2); - insert_from_string (elt, 0, XSTRING (elt)->size, 0); + insert_from_string (elt, 0, 0, XSTRING (elt)->size, + XSTRING (elt)->size_byte, 0); insert ("\n", 1); } } -- 2.39.2