Fix a minor indexing bug

This commit is contained in:
christoph.boehmwalder 2015-03-03 17:01:54 +00:00
parent e40b10a0b6
commit 1d7a8e9b73
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ namespace BizHawk.Client.Common
for (int i = LagLog.Count - 1; i > frame; i--) // Reverse order because removing from a sorted list re-indexes the items after the removed item
{
RemovedFrames.Add(i, LagLog[i]);
LagLog.RemoveAt(i);
RemovedFrames.Add(LagLog.Keys[i], LagLog.Values[i]); // use .Keys[i] instead of [i] here because indizes might not be consistent with keys
LagLog.Remove(LagLog.Keys[i]);
}
}
else if (frame == 0)