tastudio: prevent crash occurring at new state capture

mem leak is still there for N64
This commit is contained in:
feos 2016-08-02 22:46:21 +03:00
parent e362ecdbbf
commit 178820746c
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ namespace BizHawk.Client.Common
private void MaybeRemoveStates()
{
// Loop, because removing a state that has a duplicate won't save any space
while (Used > Settings.Cap || DiskUsed > (ulong)Settings.DiskCapacitymb * 1024 * 1024)
while (Used + _expectedStateSize > Settings.Cap || DiskUsed > (ulong)Settings.DiskCapacitymb * 1024 * 1024)
{
Point shouldRemove = StateToRemove();
RemoveState(shouldRemove.X, shouldRemove.Y);