From: tomo Date: Fri, 15 Nov 2002 08:51:51 +0000 (+0000) Subject: (charset_code_point): Fix problem about inheritance. X-Git-Tag: r21-2-44-utf-2000-m0_18-mcsi~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e29e9cc6a0b4c6e218304a3e78aab0c9bd93a529;p=chise%2Fxemacs-chise.git.1 (charset_code_point): Fix problem about inheritance. --- diff --git a/src/mule-charset.c b/src/mule-charset.c index 1484683..8d7452f 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1062,16 +1062,18 @@ charset_code_point (Lisp_Object charset, Emchar ch, int defined_only) Lisp_Object mother = XCHARSET_MOTHER (charset); int min = XCHARSET_MIN_CODE (charset); int max = XCHARSET_MAX_CODE (charset); - int code; + int code = -1; if ( CHARSETP (mother) ) code = charset_code_point (mother, ch, defined_only); else if (defined_only) return -1; - else + else if ( ((max == 0) && CHARSETP (mother) + && (XCHARSET_FINAL (charset) == 0)) + || ((min <= ch) && (ch <= max)) ) code = ch; - if ( ((max == 0) && CHARSETP (mother)) || - ((min <= code) && (code <= max)) ) + if ( ((max == 0) && CHARSETP (mother) && (code >= 0)) + || ((min <= code) && (code <= max)) ) { int d = code - XCHARSET_CODE_OFFSET (charset);