From 4b59282fdfd5e81dd92181bde619b0570ec47a17 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sat, 4 Jul 2020 11:00:40 -0400 Subject: [PATCH] TAStudio: bounds check previous commit --- .../tools/TAStudio/TAStudio.ListView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 90733e6c54..11830667d9 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -1171,10 +1171,10 @@ namespace BizHawk.Client.EmuHawk } } - var getVal = CurrentTasMovie.GetAxisState(i, _startAxisDrawColumn); + var getVal = (i < CurrentTasMovie.InputLogLength) ? CurrentTasMovie.GetAxisState(i, _startAxisDrawColumn) : setVal; CurrentTasMovie.SetAxisState(i, _startAxisDrawColumn, setVal); // Notice it uses new row, old column, you can only paint across a single column - if (getVal != setVal) { JumpToGreenzone(); } + if (getVal != setVal) { JumpToGreenzone(); } } }