From 504ce150ea2485cc24c2a3da348ed30b8f6b7cf3 Mon Sep 17 00:00:00 2001 From: ZedThree Date: Tue, 27 May 2014 19:58:31 +0200 Subject: [PATCH] Fix bug in gfx_get_string_width --- src/gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gfx.c b/src/gfx.c index 916b1eecf4..456f788442 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -1041,6 +1041,7 @@ void gfx_redraw_screen_rect(short left, short top, short right, short bottom) } /** + * Return the width of the string in buffer * * rct2: 0x006C2321 * buffer (esi) @@ -1050,9 +1051,8 @@ int gfx_get_string_width(char *buffer) int base; int width; - char curr_char; + uint8 curr_char; - curr_char = 0; base = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16); width = 0;