mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-07 06:39:08 +00:00
(svn r19685) -Fix (r19679): off-by-one error
This commit is contained in:
parent
879057de25
commit
ce8523f70a
@ -2082,7 +2082,7 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, B
|
||||
return CIR_INVALID_ID;
|
||||
}
|
||||
|
||||
if (sid + numinfo - ORIGINAL_SAMPLE_COUNT >= _cur_grffile->num_sounds) {
|
||||
if (sid + numinfo - ORIGINAL_SAMPLE_COUNT > _cur_grffile->num_sounds) {
|
||||
grfmsg(1, "SoundEffectChangeInfo: Attemting to change undefined sound effect (%u), max (%u). Ignoring.", sid + numinfo, ORIGINAL_SAMPLE_COUNT + _cur_grffile->num_sounds);
|
||||
return CIR_INVALID_ID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user