summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-23 13:15:07 +0000
committerrubidium <rubidium@openttd.org>2013-11-23 13:15:07 +0000
commit0e9c9921040a1d0e2aa4b820b20535f40a0d75a3 (patch)
tree6dd17568acbfb75610e9b4e248436426ead79e89 /src/pathfinder
parentb3e93d65208f74802595b12e682d98a4d534a328 (diff)
downloadopenttd-0e9c9921040a1d0e2aa4b820b20535f40a0d75a3.tar.xz
(svn r26058) -Fix: handle the return value of a number of functions better
Diffstat (limited to 'src/pathfinder')
-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);