From 15c85a884f277ebe707c292f357ad8903927c33c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 11 Jan 2003 03:38:05 +0000 Subject: [PATCH] (encode_char): Fix handling of methods SUBSET and SUPERSET. --- src/charset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/charset.c b/src/charset.c index 60ea42c2a94..a1dc6894309 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1607,10 +1607,6 @@ encode_char (charset, c) c = XINT (deunified); } - if (! CHARSET_FAST_MAP_REF ((c), charset->fast_map) - || c < CHARSET_MIN_CHAR (charset) || c > CHARSET_MAX_CHAR (charset)) - return CHARSET_INVALID_CODE (charset); - if (method == CHARSET_METHOD_SUBSET) { Lisp_Object subset_info; @@ -1645,6 +1641,10 @@ encode_char (charset, c) return CHARSET_INVALID_CODE (charset); } + if (! CHARSET_FAST_MAP_REF ((c), charset->fast_map) + || c < CHARSET_MIN_CHAR (charset) || c > CHARSET_MAX_CHAR (charset)) + return CHARSET_INVALID_CODE (charset); + if (method == CHARSET_METHOD_MAP_DEFERRED) { load_charset (charset); -- 2.39.2