changeset 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 e1226ac81142
children 0c9b64b6b6af
files src/charset.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
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);