Hotfix crash bug when load .wch file

This commit is contained in:
owomomo 2019-04-18 20:46:04 +08:00 committed by GitHub
parent 993b6fbb2c
commit 74853a83fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -623,6 +623,7 @@ bool Load_Watches(bool clear, const char* filename)
Temp.Address = 0; // default values Temp.Address = 0; // default values
Temp.Size = 'b'; Temp.Size = 'b';
Temp.Type = 'h'; Temp.Type = 'h';
Temp.comment = NULL;
char mode; char mode;
char Str_Tmp[1024]; char Str_Tmp[1024];
fgets(Str_Tmp,1024,WatchFile); fgets(Str_Tmp,1024,WatchFile);
@ -1428,4 +1429,4 @@ void UpdateWatchCheats() {
extern int FCEU_CalcCheatAffectedBytes(uint32, uint32); extern int FCEU_CalcCheatAffectedBytes(uint32, uint32);
for (int i = 0; i < WatchCount; ++i) for (int i = 0; i < WatchCount; ++i)
rswatches[i].Cheats = FCEU_CalcCheatAffectedBytes(rswatches[i].Address, WatchSizeConv(rswatches[i])); rswatches[i].Cheats = FCEU_CalcCheatAffectedBytes(rswatches[i].Address, WatchSizeConv(rswatches[i]));
} }