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 c0151655e..f0d81207d 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -809,7 +809,7 @@ int32 DoConvertTunnelBridgeRail(TileIndex tile, uint totype, bool exec)
if (!CheckTileOwnership(tile)) return CMD_ERROR;
// railway bridge
- tile = FindEdgesOfBridge(tile, &endtile);
+ tile = GetOtherBridgeEnd(tile);
// Make sure there's no vehicle on the bridge
v = FindVehicleBetween(tile, endtile, z);
if (v != NULL) {