diff options
author | rubidium <rubidium@openttd.org> | 2013-11-23 13:15:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-23 13:15:07 +0000 |
commit | 0e9c9921040a1d0e2aa4b820b20535f40a0d75a3 (patch) | |
tree | 6dd17568acbfb75610e9b4e248436426ead79e89 /src/pathfinder/yapf | |
parent | b3e93d65208f74802595b12e682d98a4d534a328 (diff) | |
download | openttd-0e9c9921040a1d0e2aa4b820b20535f40a0d75a3.tar.xz |
(svn r26058) -Fix: handle the return value of a number of functions better
Diffstat (limited to 'src/pathfinder/yapf')
-rw-r--r-- | src/pathfinder/yapf/yapf_node_rail.hpp | 2 |
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); |