diff options
author | yexo <yexo@openttd.org> | 2010-04-20 19:25:29 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-04-20 19:25:29 +0000 |
commit | ce8523f70a15ba0669bdd013cbdf011845117ceb (patch) | |
tree | 1373b21c34ca17e82e3951e4c3023323e81e599e /src | |
parent | 879057de252056df7c295e161664cb7ccac70798 (diff) | |
download | openttd-ce8523f70a15ba0669bdd013cbdf011845117ceb.tar.xz |
(svn r19685) -Fix (r19679): off-by-one error
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index cb85e6825..9084cb560 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -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; } |