1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 05:19:36 +00:00

Add proper bug comment for gSaveContext.save.dayTime getting cleared as s32 when it is u16 (#1900)

* Add proper bug comment for gSaveContext.save.dayTime getting cleared as s32 when it is u16

* Formatting?
This commit is contained in:
Tharo 2024-02-27 22:48:22 +00:00 committed by GitHub
parent 350b82c675
commit 6e2ea18154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -611,7 +611,9 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
bzero(&gSaveContext.save.entranceIndex, sizeof(s32));
bzero(&gSaveContext.save.linkAge, sizeof(s32));
bzero(&gSaveContext.save.cutsceneIndex, sizeof(s32));
// note that gSaveContext.save.dayTime is not actually the sizeof(s32)
//! @bug gSaveContext.save.dayTime is a u16 but is cleared as a 32-bit value. This is harmless as-is
//! since it is followed by nightFlag which is also reset here, but can become an issue if the save
//! layout is changed.
bzero(&gSaveContext.save.dayTime, sizeof(s32));
bzero(&gSaveContext.save.nightFlag, sizeof(s32));
bzero(&gSaveContext.save.totalDays, sizeof(s32));