From 4e7eb728db900693cbc545049af537e7420e5290 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 17 Aug 2022 18:37:16 -0500 Subject: [PATCH] GUI: fix moving GB HW seq step down --- src/gui/insEdit.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 64e098909..a306e366c 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -3178,13 +3178,13 @@ void FurnaceGUI::drawInsEdit() { if (ImGui::Button(ICON_FA_CHEVRON_DOWN "##HWCmdDown")) { if (igb.hwSeqLen-1) { e->lockEngine([ins,i]() { - ins->gb.hwSeq[i-1].cmd^=ins->gb.hwSeq[i].cmd; - ins->gb.hwSeq[i].cmd^=ins->gb.hwSeq[i-1].cmd; - ins->gb.hwSeq[i-1].cmd^=ins->gb.hwSeq[i].cmd; + ins->gb.hwSeq[i+1].cmd^=ins->gb.hwSeq[i].cmd; + ins->gb.hwSeq[i].cmd^=ins->gb.hwSeq[i+1].cmd; + ins->gb.hwSeq[i+1].cmd^=ins->gb.hwSeq[i].cmd; - ins->gb.hwSeq[i-1].data^=ins->gb.hwSeq[i].data; - ins->gb.hwSeq[i].data^=ins->gb.hwSeq[i-1].data; - ins->gb.hwSeq[i-1].data^=ins->gb.hwSeq[i].data; + ins->gb.hwSeq[i+1].data^=ins->gb.hwSeq[i].data; + ins->gb.hwSeq[i].data^=ins->gb.hwSeq[i+1].data; + ins->gb.hwSeq[i+1].data^=ins->gb.hwSeq[i].data; }); } MARK_MODIFIED;