Skip to content

Commit 619c4a3

Browse files
authored
Merge pull request #2258 from SiliconA-Z/DynamicPlaceholderTextUtil_Reset
Fix fakematch in DynamicPlaceholderTextUtil_Reset
2 parents 98ed1a6 + e82d0df commit 619c4a3

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/dynamic_placeholder_text_util.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,9 @@ static EWRAM_DATA const u8 *sStringPointers[8] = {};
77

88
void DynamicPlaceholderTextUtil_Reset(void)
99
{
10-
const u8 **ptr;
11-
u8 *fillval;
12-
const u8 **ptr2;
13-
14-
ptr = sStringPointers;
15-
fillval = NULL;
16-
ptr2 = ptr + (ARRAY_COUNT(sStringPointers) - 1);
17-
do
18-
{
19-
*ptr2-- = fillval;
20-
} while ((int)ptr2 >= (int)ptr);
10+
int i;
11+
for (i = 0; i < (int)ARRAY_COUNT(sStringPointers); i++)
12+
sStringPointers[i] = NULL;
2113
}
2214

2315
void DynamicPlaceholderTextUtil_SetPlaceholderPtr(u8 idx, const u8 *ptr)

0 commit comments

Comments
 (0)