From 0a64a8176da2d709e2ac58c6bee1fe144f761461 Mon Sep 17 00:00:00 2001 From: Sonic Dreamcaster Date: Wed, 3 Apr 2024 13:07:00 -0300 Subject: [PATCH] fix bug in Message_DisplayText --- src/engine/fox_message.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/engine/fox_message.c b/src/engine/fox_message.c index 888bd59a..2c2051de 100644 --- a/src/engine/fox_message.c +++ b/src/engine/fox_message.c @@ -69,13 +69,12 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len) s32 xChar = xPos; s32 yChar = yPos; s32 i; - s32 print; + s32 print = false; gDPSetPrimColor((*gfxPtr)++, 0x00, 0x00, 255, 255, 255, 255); gDPSetTextureLUT((*gfxPtr)++, G_TT_RGBA16); gDPLoadTLUT((*gfxPtr)++, 64, 256, gTextCharPalettes); - // bug: if the for loop is skipped, print is never initialized for (i = 0; msgPtr[i] != MSGCHAR_END && i < len; i++) { print = false; switch (msgPtr[i]) {