diff --git a/TODO.md b/TODO.md index 03e465ce6..7204a6d12 100644 --- a/TODO.md +++ b/TODO.md @@ -21,7 +21,6 @@ - ability to customize startup system - store system presets in new file - Game Boy envelope macro/sequence -- Game Boy envelope view - option to display chip names instead of "multi-system" on title bar - rewrite the system name detection function anyway - add nightly.link diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 068eb11d5..8993a7d76 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -915,6 +915,7 @@ void FurnaceGUI::noteInput(int num, int key, int vol) { } pat->data[cursor.y][1]=(unsigned char)pat->data[cursor.y][1]; if (latchIns==-2) { + if (curIns>=(int)e->song.ins.size()) curIns=-1; pat->data[cursor.y][2]=curIns; } else if (latchIns!=-1 && !e->song.ins.empty()) { pat->data[cursor.y][2]=MIN(((int)e->song.ins.size())-1,latchIns);