fix off by one error in BulkReadByte fixes #1944

This commit is contained in:
adelikat 2020-04-24 13:51:59 -05:00
parent e3682dca05
commit 099bee6bf5
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ namespace BizHawk.Emulation.Common
throw new InvalidOperationException("Invalid length of values array");
}
for (var i = addresses.Start; i < addresses.EndInclusive; i++)
for (var i = addresses.Start; i <= addresses.EndInclusive; i++)
{
values[i - addresses.Start] = PeekByte(i);
}
@ -133,7 +133,7 @@ namespace BizHawk.Emulation.Common
throw new InvalidOperationException("Invalid length of values array");
}
for (var i = 0; i<nAddresses; i++)
for (var i = 0; i < nAddresses; i++)
{
values[i] = PeekUshort(start + i*2, bigEndian);
}