Changeset - r15052:764ba7e4bb07
[Not reviewed]
master
0 1 0
yexo - 14 years ago 2010-04-20 19:25:29
yexo@openttd.org
(svn r19685) -Fix (r19679): off-by-one error
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -2082,7 +2082,7 @@ static ChangeInfoResult SoundEffectChang
 
		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;
 
	}
0 comments (0 inline, 0 general)