]> git.eshelyaron.com Git - emacs.git/commitdiff
(xlfd_charset_of_font): Fix last change.
authorAndrew Innes <andrewi@gnu.org>
Thu, 7 Dec 2000 10:41:54 +0000 (10:41 +0000)
committerAndrew Innes <andrewi@gnu.org>
Thu, 7 Dec 2000 10:41:54 +0000 (10:41 +0000)
src/ChangeLog
src/w32fns.c

index 2ee4c93c5bcc6f6b7e2494c62f7cad8443a09791..bd0872329973c3bbeca7c7db040fd30c9ffce4e7 100644 (file)
@@ -1,3 +1,7 @@
+2000-12-07  Andrew Innes  <andrewi@gnu.org>
+
+       * w32fns.c (xlfd_charset_of_font): Fix last change.
+
 2000-12-06  Dave Love  <fx@gnu.org>
 
        * md5.h (__P): Don't define -- it comes from config.h.
index 50c86d5e944b9d797800c4232ae8a123be4fecb3..b65be25262f56f93f0001e42b69455a2d5606a1d 100644 (file)
@@ -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;