Test: Fix patch loading in fuzzing frontend
Jeffrey Pfau jeffrey@endrift.com
Fri, 28 Oct 2016 16:51:54 -0700
1 files changed,
7 insertions(+),
4 deletions(-)
jump to
M
src/platform/test/fuzz-main.c
→
src/platform/test/fuzz-main.c
@@ -80,15 +80,18 @@ outputBuffer = malloc(256 * 256 * 4);
core->setVideoBuffer(core, outputBuffer, 256); } -#ifdef __AFL_HAVE_MANUAL_CONTROL - __AFL_INIT(); -#endif - #ifdef M_CORE_GBA if (core->platform(core) == PLATFORM_GBA) { ((struct GBA*) core->board)->hardCrash = false; } #endif + +#ifdef __AFL_HAVE_MANUAL_CONTROL + __AFL_INIT(); +#endif + if (args.patch) { + core->loadPatch(core, VFileOpen(args.patch, O_RDONLY)); + } mCoreLoadFile(core, args.fname); struct VFile* savestate = 0;