summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_node_rail.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder/yapf/yapf_node_rail.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_node_rail.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_node_rail.hpp b/src/pathfinder/yapf/yapf_node_rail.hpp
index 4950b2d29..b615b8227 100644
--- a/src/pathfinder/yapf/yapf_node_rail.hpp
+++ b/src/pathfinder/yapf/yapf_node_rail.hpp
@@ -196,7 +196,7 @@ struct CYapfRailNodeT
while (cur != GetLastTile() || cur_td != GetLastTrackdir()) {
if (!((obj.*func)(cur, cur_td))) return false;
- ft.Follow(cur, cur_td);
+ if (!ft.Follow(cur, cur_td)) break;
cur = ft.m_new_tile;
assert(KillFirstBit(ft.m_new_td_bits) == TRACKDIR_BIT_NONE);
cur_td = FindFirstTrackdir(ft.m_new_td_bits);