1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Byte width bug fixes

This commit is contained in:
ZedThree
2014-06-02 19:58:40 +02:00
parent fcc5e29b76
commit 0f0351d341

View File

@@ -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);
}