diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs
index 0f056a261c..580eca9465 100644
--- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs
+++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs
@@ -65,6 +65,7 @@ namespace BizHawk.Client.Common
///
/// Removes lag log and greenzone after this frame
///
+ /// The last frame that can be valid.
private void InvalidateAfter(int frame)
{
if (frame < LagLog.Count)
diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
index 2dbed31992..43ace4b027 100644
--- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
+++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
@@ -286,8 +286,8 @@ namespace BizHawk.Client.EmuHawk
}
}
else // We are going foward
- {
- var goToFrame = frame - 1;
+ {
+ var goToFrame = frame == 0 ? 0 : frame - 1;
if (_currentTasMovie[goToFrame].HasState) // Can we go directly there?
{
_currentTasMovie.SwitchToPlay();
@@ -743,8 +743,8 @@ namespace BizHawk.Client.EmuHawk
private void InsertFrameMenuItem_Click(object sender, EventArgs e)
{
- var insertionFrame = TasView.SelectedIndices().Any() ? LastSelectedIndex + 1 : 0;
- var needsToRollback = !(insertionFrame > Global.Emulator.Frame);
+ var insertionFrame = TasView.SelectedIndices().Any() ? FirstSelectedIndex : 0;
+ bool needsToRollback = insertionFrame <= Global.Emulator.Frame;
_currentTasMovie.InsertEmptyFrame(insertionFrame);
@@ -760,8 +760,8 @@ namespace BizHawk.Client.EmuHawk
private void InsertNumFramesMenuItem_Click(object sender, EventArgs e)
{
- var insertionFrame = TasView.SelectedIndices().Any() ? LastSelectedIndex + 1 : 0;
- var needsToRollback = !(insertionFrame > Global.Emulator.Frame);
+ var insertionFrame = TasView.SelectedIndices().Any() ? FirstSelectedIndex : 0;
+ bool needsToRollback = insertionFrame <= Global.Emulator.Frame;
var framesPrompt = new FramesPrompt();
var result = framesPrompt.ShowDialog();