From 36a45ff9c52545af338b5b581a43acf875f117be Mon Sep 17 00:00:00 2001 From: David Griffith Date: Fri, 26 Jan 2018 04:55:45 -0800 Subject: [PATCH] Fixed weirdness in os_char_width() carried over from old DOS interface. --- src/curses/ux_text.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/curses/ux_text.c b/src/curses/ux_text.c index 6006532..95228b3 100644 --- a/src/curses/ux_text.c +++ b/src/curses/ux_text.c @@ -277,14 +277,13 @@ int os_char_width (zchar c) int width = 0; const char *ptr = latin1_to_ascii + 3 * (c - ZC_LATIN1_MIN); - char c1 = *ptr++; - char c2 = *ptr++; - char c3 = *ptr++; + char c2, c3; - /* Why, oh, why did you declare variables that way??? */ + ptr++; + c2 = *ptr++; + c3 = *ptr++; - if (c1 == c1) /* let's avoid confusing the compiler (and me) */ - width++; + width++; if (c2 != ' ') width++; if (c3 != ' ') -- 2.34.1