From: David Griffith Date: Fri, 26 Jan 2018 12:55:45 +0000 (-0800) Subject: Fixed weirdness in os_char_width() carried over from old DOS interface. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=36a45ff9c52545af338b5b581a43acf875f117be;p=liskon_frotz.git Fixed weirdness in os_char_width() carried over from old DOS interface. --- 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 != ' ')