Fuzz: Cheats must be initialized after reset
Jeffrey Pfau jeffrey@endrift.com
Mon, 19 Sep 2016 07:31:34 -0700
1 files changed,
10 insertions(+),
10 deletions(-)
jump to
M
src/platform/test/fuzz-main.c
→
src/platform/test/fuzz-main.c
@@ -91,16 +91,6 @@ }
#endif mCoreLoadFile(core, args.fname); - struct mCheatDevice* device; - if (args.cheatsFile && (device = core->cheatDevice(core))) { - struct VFile* vf = VFileOpen(args.cheatsFile, O_RDONLY); - if (vf) { - mCheatDeviceClear(device); - mCheatParseFile(device, vf); - vf->close(vf); - } - } - struct VFile* savestate = 0; struct VFile* savestateOverlay = 0; size_t overlayOffset;@@ -118,6 +108,16 @@ free(fuzzOpts.ssOverlay);
} core->reset(core); + + struct mCheatDevice* device; + if (args.cheatsFile && (device = core->cheatDevice(core))) { + struct VFile* vf = VFileOpen(args.cheatsFile, O_RDONLY); + if (vf) { + mCheatDeviceClear(device); + mCheatParseFile(device, vf); + vf->close(vf); + } + } if (savestate) { if (!savestateOverlay) {