OpenNoteBlockStudio
OpenNoteBlockStudio copied to clipboard
Crash when pasting custom instruments in a song with no custom instruments
If you copy a note block which is a custom instrument, then make a new song, paste it, and then play the song, the program crashes.
Likely, the instrument ID becomes out-of-range, and somewhere down where NBS processes the pasted note blocks, it tries to read an invalid array index.
This behavior will likely not be patched in the current version, but we should make sure a failsafe is in place for the rewrite (either prevent the selection from being pasted with a popup warning, or create empty custom instruments up until the largest index present on the selection).