GUI: fix ins 0 being inserted on blank song

This commit is contained in:
tildearrow 2022-04-21 03:22:01 -05:00
parent dba9482cee
commit bfdfac004f
2 changed files with 1 additions and 1 deletions

View file

@ -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);