all repos — mgba @ 91c0f95e5f373bc084a050ae55b9fe93c32509cc

mGBA Game Boy Advance Emulator

Core: Only attempt to open BIOS if the path is non-null
Vicki Pfau vi@endrift.com
Mon, 20 Mar 2017 17:37:20 -0700
commit

91c0f95e5f373bc084a050ae55b9fe93c32509cc

parent

af2db9073c10043143eac79bd2f3ced9c36fb0e9

2 files changed, 6 insertions(+), 2 deletions(-)

jump to
M src/gb/core.csrc/gb/core.c

@@ -275,7 +275,9 @@ break;

default: break; }; - bios = VFileOpen(configPath, O_RDONLY); + if (configPath) { + bios = VFileOpen(configPath, O_RDONLY); + } if (bios && GBIsBIOS(bios)) { found = true; } else if (bios) {
M src/gba/core.csrc/gba/core.c

@@ -303,7 +303,9 @@ }

} if (!found) { const char* configPath = mCoreConfigGetValue(&core->config, "gba.bios"); - bios = VFileOpen(configPath, O_RDONLY); + if (configPath) { + bios = VFileOpen(configPath, O_RDONLY); + } if (bios && GBAIsBIOS(bios)) { found = true; } else if (bios) {