fix 2 watch-related bugs and a typo in an error message
This commit is contained in:
parent
b82cc74a5d
commit
859f4e3c01
|
@ -736,7 +736,7 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("You cannot set diffrent domain to a watch on the fly");
|
||||
throw new InvalidOperationException("You cannot set a different domain to a watch on the fly");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -326,7 +326,9 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
_memoryDomains = core;
|
||||
Parallel.ForEach<Watch>(_watchList, watch =>
|
||||
{
|
||||
{
|
||||
if (watch.IsSeparator)
|
||||
return;
|
||||
watch.Domain = core[watch.Domain.Name];
|
||||
watch.ResetPrevious();
|
||||
watch.Update();
|
||||
|
|
|
@ -67,8 +67,8 @@ namespace BizHawk.Emulation.Common
|
|||
public IntPtr Data { get; set; }
|
||||
|
||||
public override byte PeekByte(long addr)
|
||||
{
|
||||
if ((ulong)addr >= (ulong)Size)
|
||||
{
|
||||
if ((ulong)addr < (ulong)Size)
|
||||
return ((byte*)Data)[addr];
|
||||
else
|
||||
throw new ArgumentOutOfRangeException("addr");
|
||||
|
@ -78,7 +78,7 @@ namespace BizHawk.Emulation.Common
|
|||
{
|
||||
if (Writable)
|
||||
{
|
||||
if ((ulong)addr >= (ulong)Size)
|
||||
if ((ulong)addr < (ulong)Size)
|
||||
((byte*)Data)[addr] = val;
|
||||
else
|
||||
throw new ArgumentOutOfRangeException("addr");
|
||||
|
|
Loading…
Reference in New Issue