32x and sms savestates. Core-independent z80 state. SS bugfixing/refactoring.
[picodrive.git] / pico / memory.c
index d0b1697..00e5016 100644 (file)
@@ -322,7 +322,7 @@ static u32 PicoRead8_sram(u32 a)
 static u32 PicoRead16_sram(u32 a)\r
 {\r
   u32 d;\r
-  if (SRam.end >= a && a >= SRam.start && (Pico.m.sram_reg & SRR_MAPPED))\r
+  if (SRam.start <= a && a <= SRam.end && (Pico.m.sram_reg & SRR_MAPPED))\r
   {\r
     if (SRam.flags & SRF_EEPROM)\r
       d = EEPROM_read();\r