projects
/
m17n
/
m17n-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8becd3
)
(xfont_encode_char): Return MCHAR_INVALID_CODE if code
author
handa
<handa>
Tue, 30 Mar 2004 08:02:31 +0000
(08:02 +0000)
committer
handa
<handa>
Tue, 30 Mar 2004 08:02:31 +0000
(08:02 +0000)
>= 0x10000.
src/m17n-X.c
patch
|
blob
|
history
diff --git
a/src/m17n-X.c
b/src/m17n-X.c
index
76093b1
..
abed3ca
100644
(file)
--- 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;