Mercurial > emacs
changeset 34314:8318a4ea6764
(xlfd_charset_of_font): Fix last change.
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Thu, 07 Dec 2000 10:41:05 +0000 |
parents | b5810f23b1b4 |
children | 17b8a35aa5b0 |
files | src/w32fns.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32fns.c Thu Dec 07 00:00:11 2000 +0000 +++ b/src/w32fns.c Thu Dec 07 10:41:05 2000 +0000 @@ -5462,9 +5462,11 @@ if (!encoding || encoding == fontname) return NULL; - charset = strrchr(encoding - 1, '-'); - - if (!charset || strcmp(charset, "-*-*") == 0) + for (charset = encoding - 1; charset >= fontname; charset--) + if (*charset == '-') + break; + + if (charset == fontname || strcmp(charset, "-*-*") == 0) return NULL; return charset + 1;