From: Timo Korvola Date: Sun, 4 Mar 2018 19:53:38 +0000 (+0200) Subject: Fix os_string_width. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=2304506e854e64ab60a91f5d607654b10e6aab79;p=liskon_frotz.git Fix os_string_width. Width was computed wrong for strings with more than one style or font change. --- diff --git a/src/sdl/sf_fonts.c b/src/sdl/sf_fonts.c index f7bda1e..2a2a039 100644 --- a/src/sdl/sf_fonts.c +++ b/src/sdl/sf_fonts.c @@ -572,12 +572,12 @@ int os_string_width(const zchar *s) { if (c == ZC_NEW_STYLE) { - wacc = width+oh; width = 0; + wacc += oh; os_set_text_style(*s++); } else if (c == ZC_NEW_FONT) { - wacc = width+oh; width = 0; + wacc += oh; os_set_font(*s++); } else