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

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

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