]> git.eshelyaron.com Git - emacs.git/commitdiff
(encode_char): Fix handling of methods SUBSET and SUPERSET.
authorKenichi Handa <handa@m17n.org>
Sat, 11 Jan 2003 03:38:05 +0000 (03:38 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 11 Jan 2003 03:38:05 +0000 (03:38 +0000)
src/charset.c

index 60ea42c2a941a3d7b3a7f0b7c76a24b5b527226e..a1dc6894309fdf365cb1b11601d458102b644653 100644 (file)
@@ -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);