From 1fb23731b3e6997bae909f4fb8738b68b524c155 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 30 Mar 2004 08:02:31 +0000 Subject: [PATCH] (xfont_encode_char): Return MCHAR_INVALID_CODE if code >= 0x10000. --- src/m17n-X.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/m17n-X.c b/src/m17n-X.c index 76093b1..abed3ca 100644 --- a/src/m17n-X.c +++ b/src/m17n-X.c @@ -810,12 +810,12 @@ xfont_encode_char (MRealizedFont *rfont, int c, unsigned code) unsigned min_byte1, max_byte1, min_byte2, max_byte2; int all_chars_exist; - if (rfont->status < 0) - return -1; + if (rfont->status < 0 || code >= 0x10000) + return MCHAR_INVALID_CODE; if (rfont->status == 0) { if (xfont_open (rfont) < 0) - return -1; + return MCHAR_INVALID_CODE; } xfont = (MXFontInfo *) rfont->info; f = xfont->f; -- 1.7.10.4