fix bug from 111648cf98 breaking hex editor and maybe other stuff

This commit is contained in:
zeromus 2016-06-01 23:05:56 -05:00
parent f56589ade1
commit 0e7adbd818
1 changed files with 3 additions and 3 deletions

View File

@ -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");