From 09e97fff539a7235a229614e8f8ac0d13ba0a5a3 Mon Sep 17 00:00:00 2001 From: PokeCodec Date: Mon, 24 Aug 2020 17:34:26 -0400 Subject: [PATCH] UB --- src/wireless_communication_status_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 87b200f14a..2376d2b27a 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -237,7 +237,7 @@ static void PrintHeaderTexts(void) FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); WCSS_AddTextPrinterParameterized(0, 1, sHeaderTexts[0], GetStringCenterAlignXOffset(1, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN); - for (i = 0; i < (int)ARRAY_COUNT(*sHeaderTexts) - 1; i++) + for (i = 0; i < (int)ARRAY_COUNT(*sHeaderTexts) - 1; i++) //UB: sizeOf returns the size of the pointer, not the array itself in this case. { WCSS_AddTextPrinterParameterized(1, 1, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_WHITE_LGRAY); }