From 09081ca119c3debcc72159a46d3bafabfd7519bb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 2 Jun 2021 16:14:14 +0300 Subject: [PATCH] Fix a typo in 'produce_glyphless_glyph' * src/xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Remove workaround for lack of its initialization. (Bug#8215) --- src/xdisp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 4841a0af6f3..0a95aa32f94 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -30290,7 +30290,7 @@ produce_glyphless_glyph (struct it *it, bool for_no_font, Lisp_Object acronym) /* +4 is for vertical bars of a box plus 1-pixel spaces at both side. */ width = max (metrics_upper.width, metrics_lower.width) + 4; - upper_xoff = upper_yoff = 2; /* the typical case */ + upper_xoff = lower_xoff = 2; /* the typical case */ if (base_width >= width) { /* Align the upper to the left, the lower to the right. */ @@ -30304,13 +30304,7 @@ produce_glyphless_glyph (struct it *it, bool for_no_font, Lisp_Object acronym) if (metrics_upper.width >= metrics_lower.width) lower_xoff = (width - metrics_lower.width) / 2; else - { - /* FIXME: This code doesn't look right. It formerly was - missing the "lower_xoff = 0;", which couldn't have - been right since it left lower_xoff uninitialized. */ - lower_xoff = 0; - upper_xoff = (width - metrics_upper.width) / 2; - } + upper_xoff = (width - metrics_upper.width) / 2; } /* +5 is for horizontal bars of a box plus 1-pixel spaces at -- 2.39.2