(svn r12185) -Fix (r12177): wrong operator priority, hopefully harmless (spotted by michi_cc)
authorsmatz
Mon, 18 Feb 2008 23:37:16 +0000
changeset 9099 b547d33e53d8
parent 9098 4fb97a0770f0
child 9100 a68061bad214
(svn r12185) -Fix (r12177): wrong operator priority, hopefully harmless (spotted by michi_cc)
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Mon Feb 18 22:50:58 2008 +0000
+++ b/src/road_cmd.cpp	Mon Feb 18 23:37:16 2008 +0000
@@ -1332,7 +1332,7 @@
 					RoadBits bits = GetRoadBits(tile, rt);
 
 					/* no roadbit at this side of tile, return 0 */
-					if (side != INVALID_DIAGDIR && DiagDirToRoadBits(side) & bits == 0) return 0;
+					if (side != INVALID_DIAGDIR && (DiagDirToRoadBits(side) & bits) == 0) return 0;
 
 					uint multiplier = drd_to_multiplier[rt == ROADTYPE_TRAM ? DRD_NONE : GetDisallowedRoadDirections(tile)];
 					return HasRoadWorks(tile) ? 0 : _road_trackbits[bits] * multiplier;