(svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a TileIndex points to a tile on the map

This commit is contained in:
tron
2006-01-30 17:18:45 +00:00
parent ec74a57ada
commit 244d4ab5cb
6 changed files with 10 additions and 10 deletions

View File

@@ -209,7 +209,7 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2)
bridge_type = GB(p2, 0, 8);
railtype = GB(p2, 8, 8);
if (p1 > MapSize()) return CMD_ERROR;
if (p1 >= MapSize()) return CMD_ERROR;
// type of bridge
if (HASBIT(railtype, 7)) { // bit 15 of original p2 param