diff --git a/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs b/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs index 4d551f86e6..f7b3130881 100644 --- a/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs +++ b/BizHawk.Client.Common/movie/tasproj/StateManagerDecay.cs @@ -156,6 +156,8 @@ namespace BizHawk.Client.Common backwardFrame = currentFrame; } } + + int decayStatesLast = decayStates; if (forwardFrame > -1 && backwardFrame > -1) { @@ -192,10 +194,11 @@ namespace BizHawk.Client.Common decayStates--; } } - else - { + // we're very sorry about failing to find states to remove, but we can't go beyond capacity, so remove at least something // this shouldn't happen, but if we don't do it here, nothing good will happen either + if (decayStatesLast == decayStates) + { if (_tsm.RemoveState(_tsm.GetStateFrameByIndex(1))) { // decrementing this if no state was removed is BAD