tunnelbridge_cmd.c
changeset 2133 d7f582b7001d
parent 2085 876f20a0e843
child 2140 a04d0142ad65
--- a/tunnelbridge_cmd.c	Tue Jul 19 21:28:15 2005 +0000
+++ b/tunnelbridge_cmd.c	Tue Jul 19 21:49:35 2005 +0000
@@ -845,7 +845,7 @@
 		// railway tunnel
 		if (!CheckTileOwnership(tile)) return CMD_ERROR;
 
-		if ( (uint)(_m[tile].m3 & 0xF) == totype) return CMD_ERROR;
+		if ((_m[tile].m3 & 0xFU) == totype) return CMD_ERROR;
 
 		endtile = CheckTunnelBusy(tile, &length);
 		if (endtile == INVALID_TILE) return CMD_ERROR;
@@ -864,7 +864,7 @@
 			return CMD_ERROR;
 
 		// tile is already of requested type?
-		if ( (uint)(_m[tile].m3 & 0xF) == totype) return CMD_ERROR;
+		if ((_m[tile].m3 & 0xFU) == totype) return CMD_ERROR;
 		// change type.
 		if (exec) {
 			_m[tile].m3 = (_m[tile].m3 & 0xF0) + totype;
@@ -893,7 +893,7 @@
 			return CMD_ERROR;
 		}
 
-		if ( (uint)(_m[tile].m3 & 0xF) == totype) return CMD_ERROR;
+		if ((_m[tile].m3 & 0xFU) == totype) return CMD_ERROR;
 		cost = 0;
 		do {
 			if (exec) {