summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-04-20 19:25:29 +0000
committeryexo <yexo@openttd.org>2010-04-20 19:25:29 +0000
commitce8523f70a15ba0669bdd013cbdf011845117ceb (patch)
tree1373b21c34ca17e82e3951e4c3023323e81e599e /src
parent879057de252056df7c295e161664cb7ccac70798 (diff)
downloadopenttd-ce8523f70a15ba0669bdd013cbdf011845117ceb.tar.xz
(svn r19685) -Fix (r19679): off-by-one error
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp2
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;
}