AUDIO: Fix Amiga's SoundFx instrument loading.

The instrument names are a maximum of 22 characters in length but
were previously shortened to a maximum of 8 characters. At least in
Amiga versions of Operation Stealth some of the instrument names are
longer than 8 characters and failed to be loaded because of this.
Raising the limit from 8 to 22 characters fixes this.

Addresses bug #11676.
This commit is contained in:
Kari Salminen 2020-09-05 22:41:25 +03:00 committed by Eugene Sandulenko
parent 60b2c9164b
commit 9098af1029

View File

@ -148,7 +148,7 @@ bool SoundFx::load(Common::SeekableReadStream *data, LoadSoundFxInstrumentCallba
}
} else {
if (ins->name[0]) {
ins->name[8] = '\0';
ins->name[22] = '\0';
ins->data = (int8 *)(*loadCb)(ins->name, 0);
if (!ins->data) {
return false;