From e82d0df9ad9f94a1db778778b30a8a05ba6bf55e Mon Sep 17 00:00:00 2001 From: AZero13 <83477269+SiliconA-Z@users.noreply.github.com> Date: Sat, 28 Mar 2026 15:31:37 -0400 Subject: [PATCH] Fix fakematch in DynamicPlaceholderTextUtil_Reset From pokefirered --- src/dynamic_placeholder_text_util.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/dynamic_placeholder_text_util.c b/src/dynamic_placeholder_text_util.c index 1ec0c1e06b..b22ae4333d 100644 --- a/src/dynamic_placeholder_text_util.c +++ b/src/dynamic_placeholder_text_util.c @@ -7,17 +7,9 @@ static EWRAM_DATA const u8 *sStringPointers[8] = {}; void DynamicPlaceholderTextUtil_Reset(void) { - const u8 **ptr; - u8 *fillval; - const u8 **ptr2; - - ptr = sStringPointers; - fillval = NULL; - ptr2 = ptr + (ARRAY_COUNT(sStringPointers) - 1); - do - { - *ptr2-- = fillval; - } while ((int)ptr2 >= (int)ptr); + int i; + for (i = 0; i < (int)ARRAY_COUNT(sStringPointers); i++) + sStringPointers[i] = NULL; } void DynamicPlaceholderTextUtil_SetPlaceholderPtr(u8 idx, const u8 *ptr)