tastudio history: fix bug where undoing the movie extension (caused by drawing beyond the movie length) would swallow all the movie

This commit is contained in:
feos 2016-08-29 21:18:55 +03:00 committed by adelikat
parent 5761b6b7ce
commit 9e8c152dde
1 changed files with 2 additions and 0 deletions

View File

@ -335,6 +335,8 @@ namespace BizHawk.Client.Common
var minuend = Math.Min(lastFrame + 1, movie.InputLogLength);
if (firstFrame > minuend)
undoLength = minuend;
else if (firstFrame == minuend)
undoLength = Math.Max(lastFrame + 1, movie.InputLogLength) - firstFrame;
else
undoLength = minuend - firstFrame;