Fixed a crash with -Os on some compilers.

This commit is contained in:
Dual Tachyon 2023-08-11 14:06:33 +01:00
parent bce35ec297
commit 615d27a625
3 changed files with 3 additions and 5 deletions

View File

@ -752,9 +752,7 @@ void BOARD_EEPROM_Init(void)
EEPROM_ReadBuffer(0x0F30, gCustomPasswordKey, 16);
for (i = 0; i < 4; i++) {
const uint32_t *pKey = (const uint32_t *)gCustomPasswordKey;
if (pKey[i] != 0xFFFFFFFFU) {
if (gCustomPasswordKey[i] != 0xFFFFFFFFU) {
bIsCheckExistingPassword = true;
return;
}

2
misc.c
View File

@ -27,7 +27,7 @@ bool gSetting_350EN;
bool gSetting_ScrambleEnable;
uint8_t gSetting_F_LOCK;
uint8_t gCustomPasswordKey[16];
uint32_t gCustomPasswordKey[4];
bool bIsCheckExistingPassword;

2
misc.h
View File

@ -31,7 +31,7 @@ extern bool gSetting_350EN;
extern bool gSetting_ScrambleEnable;
extern uint8_t gSetting_F_LOCK;
extern uint8_t gCustomPasswordKey[16];
extern uint32_t gCustomPasswordKey[4];
extern bool bIsCheckExistingPassword;