mirror of https://github.com/mgba-emu/mgba.git
GBA Cheats: Fix uninitialized memory getting freed when saving
This commit is contained in:
parent
559c3212fd
commit
82f503bc4e
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Bugfixes:
|
||||||
- GB MBC: Fix RTC access when no save file is loaded
|
- GB MBC: Fix RTC access when no save file is loaded
|
||||||
- GB: Properly clear KEY1 bit 0 when switching speeds
|
- GB: Properly clear KEY1 bit 0 when switching speeds
|
||||||
- LR35902: Fix core never exiting with certain event patterns
|
- LR35902: Fix core never exiting with certain event patterns
|
||||||
|
- GBA Cheats: Fix uninitialized memory getting freed when saving
|
||||||
Misc:
|
Misc:
|
||||||
- All: Only update version info if needed
|
- All: Only update version info if needed
|
||||||
- FFmpeg: Encoding cleanup
|
- FFmpeg: Encoding cleanup
|
||||||
|
|
|
@ -300,14 +300,16 @@ static void GBACheatDumpDirectives(struct mCheatSet* set, struct StringList* dir
|
||||||
}
|
}
|
||||||
StringListClear(directives);
|
StringListClear(directives);
|
||||||
|
|
||||||
char** directive = StringListAppend(directives);
|
char** directive;
|
||||||
switch (cheats->gsaVersion) {
|
switch (cheats->gsaVersion) {
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
|
directive = StringListAppend(directives);
|
||||||
*directive = strdup("GSAv1");
|
*directive = strdup("GSAv1");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
|
directive = StringListAppend(directives);
|
||||||
*directive = strdup("PARv3");
|
*directive = strdup("PARv3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue