mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-09 09:10:51 +00:00
fix MBF21 GetSoundArg off-by-one: sound indices are 1-indexed in args because Killough
This commit is contained in:
parent
e6c6471e2f
commit
97859fd608
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ struct MBFParamState
|
|||
int GetSoundArg(int i, int def = 0)
|
||||
{
|
||||
int num = argsused & (1 << i) ? (int)args[i] : def;
|
||||
if (num > 0 && num < int(SoundMap.Size())) return SoundMap[num];
|
||||
if (num > 0 && num <= int(SoundMap.Size())) return SoundMap[num-1];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue