mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
It doesn't appear to be an error to have an invalid instrument index
This commit is contained in:
parent
a79829068c
commit
53182d8122
|
@ -112,8 +112,10 @@ pub fn parse_module(module: &Module) -> agb_tracker_interop::Track {
|
|||
} else {
|
||||
let instrument_index = (slot.instrument - 1) as usize;
|
||||
|
||||
if let InstrumentType::Default(ref instrument) =
|
||||
module.instrument[instrument_index].instr_type
|
||||
if let Some(InstrumentType::Default(ref instrument)) = module
|
||||
.instrument
|
||||
.get(instrument_index)
|
||||
.map(|instrument| &instrument.instr_type)
|
||||
{
|
||||
let sample_slot = *instrument
|
||||
.sample_for_note
|
||||
|
|
Loading…
Reference in a new issue