mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-02 09:17:26 +00:00
fix possible ins create type error
when cursor is outside
This commit is contained in:
parent
3d7079226f
commit
826d1730e0
1 changed files with 3 additions and 0 deletions
|
@ -2575,6 +2575,9 @@ int DivEngine::addInstrument(int refChan, DivInstrumentType fallbackType) {
|
|||
DivInstrument* ins=new DivInstrument;
|
||||
int insCount=(int)song.ins.size();
|
||||
DivInstrumentType prefType;
|
||||
if (refChan>chans) {
|
||||
refChan=chans-1;
|
||||
}
|
||||
if (refChan<0) {
|
||||
prefType=fallbackType;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue