Changeset - r20058:431b83660079
[Not reviewed]
master
0 1 0
rubidium - 12 years ago 2013-02-17 20:16:49
rubidium@openttd.org
(svn r25016) -Fix [FS#5476]: integer overflow in UpdateStationRating (fonsinchen)
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -3307,7 +3307,9 @@ static void UpdateStationRating(Station 
 
					waiting_changed = true;
 
				}
 

	
 
				if (waiting_changed) ge->cargo.Truncate(ge->cargo.Count() - waiting);
 
				if (waiting_changed && waiting < ge->cargo.Count()) {
 
					ge->cargo.Truncate(ge->cargo.Count() - waiting);
 
				}
 
			}
 
		}
 
	}
0 comments (0 inline, 0 general)