summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-03-02 05:48:00 +0000
committerKarl Heuer <kwzh@gnu.org>1994-03-02 05:48:00 +0000
commit74712156d663b59a94f55da83101ea27b140e16e (patch)
treefe57748fca8d1ddd78be30af1152b1ec792e8588
parent048822963e17ee237955b42ca4597775dba4374e (diff)
downloademacs-74712156d663b59a94f55da83101ea27b140e16e.tar.gz
(Fx_list_fonts): Avoid confused increment of info.
-rw-r--r--src/xfns.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 19c0f0b3739..c5a064809fa 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2582,15 +2582,17 @@ fonts), even if they match PATTERN and FACE.")
tail = &list;
for (i = 0; i < num_fonts; i++)
{
+ XFontStruct *thisinfo;
+
#ifdef BROKEN_XLISTFONTSWITHINFO
BLOCK_INPUT;
- info = XLoadQueryFont (x_current_display, names[i]);
+ thisinfo = XLoadQueryFont (x_current_display, names[i]);
UNBLOCK_INPUT;
#else
- info = &info[i];
+ thisinfo = &info[i];
#endif
- if (info && (! size_ref
- || same_size_fonts (info, size_ref)))
+ if (thisinfo && (! size_ref
+ || same_size_fonts (thisinfo, size_ref)))
{
*tail = Fcons (build_string (names[i]), Qnil);
tail = &XCONS (*tail)->cdr;