From 0f0351d34147aa89d2259fcd4f9c3c85d77436cd Mon Sep 17 00:00:00 2001 From: ZedThree Date: Mon, 2 Jun 2014 19:58:40 +0200 Subject: [PATCH] Byte width bug fixes --- src/gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gfx.c b/src/gfx.c index 4a3157dc6f..43e1c3309e 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -1132,7 +1132,7 @@ void gfx_draw_string_centred(rct_drawpixelinfo *dpi, int format, int x, int y, i text_width = gfx_get_string_width(buffer); // Draw the text centred - if (text_width <= 0xFFF) { + if (text_width <= 0xFFFF) { x -= text_width / 2; gfx_draw_string(dpi, buffer, colour, x, y); } @@ -1603,7 +1603,7 @@ void gfx_draw_string_centred_clipped(rct_drawpixelinfo *dpi, int format, void *a text_width = gfx_clip_string(buffer, width); // Draw the text centred - if (text_width <= 0xFFF) { + if (text_width <= 0xFFFF) { x -= (text_width - 1) / 2; gfx_draw_string(dpi, buffer, colour, x, y); }