all repos — mgba @ 17850c17519ff7268f2849f93efd9817e584c377

mGBA Game Boy Advance Emulator

Test: Fix patch loading in fuzzing frontend
Jeffrey Pfau jeffrey@endrift.com
Fri, 28 Oct 2016 16:51:54 -0700
commit

17850c17519ff7268f2849f93efd9817e584c377

parent

17e883aea43290f56bd31ffb45e849fdb4c2d506

1 files changed, 7 insertions(+), 4 deletions(-)

jump to
M src/platform/test/fuzz-main.csrc/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;