From 67ff6abb17cf02e574fb455bb1e60837f2a25fb4 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 18 Jan 2020 13:35:22 -0600 Subject: [PATCH] Tastudio - fix clone input when cloing multiple rows --- BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index d65c832519..a5cc23c616 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -736,11 +736,12 @@ namespace BizHawk.Client.EmuHawk if (TasView.AnyRowsSelected) { var framesToInsert = TasView.SelectedRows; - var insertionFrame = Math.Min(TasView.LastSelectedIndex ?? 0 + 1, CurrentTasMovie.InputLogLength); + var insertionFrame = Math.Min((TasView.LastSelectedIndex ?? 0) + 1, CurrentTasMovie.InputLogLength); var needsToRollback = TasView.FirstSelectedIndex < Emulator.Frame; var inputLog = framesToInsert - .Select(frame => CurrentTasMovie.GetInputLogEntry(frame)); + .Select(frame => CurrentTasMovie.GetInputLogEntry(frame)) + .ToList(); CurrentTasMovie.InsertInput(insertionFrame, inputLog);