GBA Cheats: Fix uninitialized memory getting freed when saving

This commit is contained in:
Jeffrey Pfau 2016-09-27 10:20:03 -07:00
parent 628442e810
commit 816cb5af44
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@ Bugfixes:
- GB: Initialize audio properly
- GB MBC: Fix RTC access when no save file is loaded
- GB: Properly clear KEY1 bit 0 when switching speeds
- GBA Cheats: Fix uninitialized memory getting freed when saving
Misc:
- All: Only update version info if needed
- FFmpeg: Encoding cleanup

View File

@ -300,14 +300,16 @@ static void GBACheatDumpDirectives(struct mCheatSet* set, struct StringList* dir
}
StringListClear(directives);
char** directive = StringListAppend(directives);
char** directive;
switch (cheats->gsaVersion) {
case 1:
case 2:
directive = StringListAppend(directives);
*directive = strdup("GSAv1");
break;
case 3:
case 4:
directive = StringListAppend(directives);
*directive = strdup("PARv3");
break;
}