port UBFIXes from emerald

This commit is contained in:
Kurausukun
2021-06-26 04:04:22 -04:00
parent 8116790c08
commit 88bd618496
8 changed files with 65 additions and 7 deletions
+5
View File
@@ -459,12 +459,17 @@ void InitEasyChatPhrases(void)
gSaveBlock1Ptr->mail[i].words[j] = EC_WORD_UNDEFINED;
}
#ifndef UBFIX
// BUG: This is supposed to clear 64 bits, but this loop is clearing 64 bytes.
// However, this bug has no resulting effect on gameplay because only the
// Mauville old man data is corrupted, which is initialized directly after
// this function is called when starting a new game.
for (i = 0; i < 64; i++)
gSaveBlock1Ptr->additionalPhrases[i] = 0;
#else
for (i = 0; i < NELEMS(gSaveBlock1Ptr->additionalPhrases); i++)
gSaveBlock1Ptr->additionalPhrases[i] = 0;
#endif
}
void EC_ResetMEventProfileMaybe(void)