summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index f301d7be7..53dc96c9f 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -431,7 +431,7 @@ static int32 DoBuildTunnel(int x, int y, int x2, int y2, uint32 flags, uint exc_
TileInfo ti;
uint z;
- if ( (uint) x > TILE_X_MAX * 16 - 1 || (uint) y > TILE_X_MAX * 16 - 1)
+ if ((uint)x > MapMaxX() * 16 - 1 || (uint)y > MapMaxY() * 16 - 1)
return CMD_ERROR;
/* check if valid, and make sure that (x,y) is smaller than (x2,y2) */