Mercurial > hg > openttd
changeset 15062:4ae8e013d8e4 draft
(svn r19685) -Fix (r19679): off-by-one error
author | yexo <yexo@openttd.org> |
---|---|
date | Tue, 20 Apr 2010 19:25:29 +0000 |
parents | ce5efb7cc2ce |
children | 9bc57c18fb40 |
files | src/newgrf.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2082,7 +2082,7 @@ 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; }