fix bug from 111648cf98
breaking hex editor and maybe other stuff
This commit is contained in:
parent
f56589ade1
commit
0e7adbd818
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue