From 1b33d1dc9da646b320d478aa6182f4b9086730d9 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 14 Jan 2013 07:22:36 +0000 Subject: [PATCH] snes-fix bug where you cant load games lacking save ram --- BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs index 76dee83592..b0c80f20cd 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -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;