From: Kenichi Handa Date: Sat, 11 Jan 2003 03:38:05 +0000 (+0000) Subject: (encode_char): Fix handling of methods SUBSET and SUPERSET. X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~102 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=15c85a884f277ebe707c292f357ad8903927c33c;p=emacs.git (encode_char): Fix handling of methods SUBSET and SUPERSET. --- 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);