Changeset - r21024:19cdb93700c9
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-11-25 13:13:35
rubidium@openttd.org
(svn r26104) -Fix: do not attempt to do stuff with an invalid direction, especially using it as index into a table
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -1317,7 +1317,7 @@ static int GrowTownAtRoad(Town *t, TileI
 

	
 
		/* Exclude the source position from the bitmask
 
		 * and return if no more road blocks available */
 
		cur_rb &= ~DiagDirToRoadBits(ReverseDiagDir(target_dir));
 
		if (IsValidDiagDirection(target_dir)) cur_rb &= ~DiagDirToRoadBits(ReverseDiagDir(target_dir));
 
		if (cur_rb == ROAD_NONE) {
 
			return _grow_town_result;
 
		}
0 comments (0 inline, 0 general)