From 0e7adbd818d125ec6af3f154fadd14291a7242a8 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 1 Jun 2016 23:05:56 -0500 Subject: [PATCH] fix bug from 111648cf98fe533bbd7a8d5d14afe475bc40878f breaking hex editor and maybe other stuff --- .../Base Implementations/MemoryDomainImpls.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs b/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs index d660cc4f9d..6d672d139f 100644 --- a/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs +++ b/BizHawk.Emulation.Common/Base Implementations/MemoryDomainImpls.cs @@ -108,7 +108,7 @@ namespace BizHawk.Emulation.Common public override byte PeekByte(long addr) { - if ((ulong)addr >= (ulong)Size) + if ((ulong)addr < (ulong)Size) return ((byte*)Data)[addr ^ 1]; else throw new ArgumentOutOfRangeException("addr"); @@ -117,8 +117,8 @@ namespace BizHawk.Emulation.Common public override void PokeByte(long addr, byte val) { if (Writable) - { - if ((ulong)addr >= (ulong)Size) + { + if ((ulong)addr < (ulong)Size) ((byte*)Data)[addr ^ 1] = val; else throw new ArgumentOutOfRangeException("addr");