From: Andrew Innes Date: Thu, 7 Dec 2000 10:41:54 +0000 (+0000) Subject: (xlfd_charset_of_font): Fix last change. X-Git-Tag: emacs-pretest-21.0.93~127 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=478ea067cfabd566cf45f47c0d7f52745a6383f4;p=emacs.git (xlfd_charset_of_font): Fix last change. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2ee4c93c5bc..bd087232997 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2000-12-07 Andrew Innes + + * w32fns.c (xlfd_charset_of_font): Fix last change. + 2000-12-06 Dave Love * md5.h (__P): Don't define -- it comes from config.h. diff --git a/src/w32fns.c b/src/w32fns.c index 50c86d5e944..b65be25262f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5462,9 +5462,11 @@ char * xlfd_charset_of_font (char * fontname) if (!encoding || encoding == fontname) return NULL; - charset = strrchr(encoding - 1, '-'); + for (charset = encoding - 1; charset >= fontname; charset--) + if (*charset == '-') + break; - if (!charset || strcmp(charset, "-*-*") == 0) + if (charset == fontname || strcmp(charset, "-*-*") == 0) return NULL; return charset + 1;