Commit 8cc53f96 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(CHAR_CHARSET_P): Check if the encoder is loaded or

not before accessing it.
parent 9c6361c9
2008-11-29 Kenichi Handa <handa@m17n.org>
* charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or
not before accessing it.
* charset.c (Fdefine_charset_internal): After calculating
min_char, max_char, and fastmap, copy the charset structure again.
(encode_char): Fix the previous change.
......
......@@ -503,7 +503,8 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
&& ((charset)->method == CHARSET_METHOD_OFFSET \
? (c) >= (charset)->min_char && (c) <= (charset)->max_char \
: ((charset)->method == CHARSET_METHOD_MAP \
&& (charset)->compact_codes_p) \
&& (charset)->compact_codes_p \
&& CHAR_TABLE_P (CHARSET_ENCODER (charset))) \
? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \
: encode_char ((charset), (c)) != (charset)->invalid_code))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment