Ignored case-fixing characters in tests' TryMessage

This commit is contained in:
Ariel A 2024-01-08 21:04:25 -05:00
parent 85aab338a9
commit 90be465a9a

View file

@ -12,6 +12,7 @@
#include "random.h" #include "random.h"
#include "test/battle.h" #include "test/battle.h"
#include "window.h" #include "window.h"
#include "text.h"
#include "constants/trainers.h" #include "constants/trainers.h"
#if defined(__INTELLISENSE__) #if defined(__INTELLISENSE__)
@ -1185,6 +1186,13 @@ static s32 TryMessage(s32 i, s32 n, const u8 *string)
if (string[j] == CHAR_PROMPT_CLEAR) if (string[j] == CHAR_PROMPT_CLEAR)
j++; j++;
} }
#if DECAP_ENABLED
// ignore case-fixing characters in string
if (string[j] == CHAR_FIXED_CASE || string[j] == CHAR_UNFIX_CASE) {
k--; // will be incremented in 'continue'
continue;
}
#endif
if (string[j] != event->pattern[k]) if (string[j] != event->pattern[k])
{ {
break; break;