fix bugs in the delta rewinding code?

This commit is contained in:
zeromus 2014-04-08 00:22:14 +00:00
parent 703f1a3355
commit 3dc3ede00a
1 changed files with 1 additions and 2 deletions

View File

@ -277,7 +277,6 @@ namespace BizHawk.Client.Common
inChangeSequence = true; inChangeSequence = true;
beginChangeSequence = i; beginChangeSequence = i;
continue;
} }
if (i - beginChangeSequence == 254 || i == currentState.Length - 1) if (i - beginChangeSequence == 254 || i == currentState.Length - 1)
@ -357,7 +356,7 @@ namespace BizHawk.Client.Common
else else
{ {
var output = new MemoryStream(_lastState); var output = new MemoryStream(_lastState);
while (ms.Position < ms.Length - 1) while (ms.Position < ms.Length)
{ {
var len = reader.ReadByte(); var len = reader.ReadByte();
int offset = isSmall ? reader.ReadUInt16() : reader.ReadInt32(); int offset = isSmall ? reader.ReadUInt16() : reader.ReadInt32();