diff src/charset.c @ 89365:110a171821db

(encode_char): Fix handling of methods SUBSET and SUPERSET.
author Kenichi Handa <handa@m17n.org>
date Sat, 11 Jan 2003 03:38:05 +0000
parents 1991025c6bc2
children 4b653615bbe4
line wrap: on
line diff
--- a/src/charset.c	Sat Jan 11 01:59:15 2003 +0000
+++ b/src/charset.c	Sat Jan 11 03:38:05 2003 +0000
@@ -1607,10 +1607,6 @@
 	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 @@
       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);