snes-fix bug where you cant load games lacking save ram

This commit is contained in:
zeromus 2013-01-14 07:22:36 +00:00
parent e911a17a4e
commit 1b33d1dc9d
1 changed files with 4 additions and 0 deletions

View File

@ -754,6 +754,10 @@ namespace BizHawk.Emulation.Consoles.Nintendo.SNES
int size = api.snes_get_memory_size(id);
int mask = size - 1;
//if this type of memory isnt available, dont make the memory domain (most commonly save ram)
if (size == 0)
return null;
byte* blockptr = api.snes_get_memory_data(id);
MemoryDomain md;