summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-14 09:23:52 +0000
committerrubidium <rubidium@openttd.org>2007-02-14 09:23:52 +0000
commitf3dc5596ad3b0e77819e78cc9ee803364d43a7c7 (patch)
tree46304e36d28b1106a7814bdcde9f68935be46106
parent59284954aea6a92103c4545875b634736b904eb6 (diff)
downloadopenttd-f3dc5596ad3b0e77819e78cc9ee803364d43a7c7.tar.xz
(svn r8725) -Fix (r8712): test the first bit of the bitmask, not the nth, as we are shifting the bitmask.
-rw-r--r--src/roadveh_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 6c923c9c1..82b8b3bc8 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1202,7 +1202,7 @@ do_it:;
uint best_maxlen = (uint)-1;
uint bitmask = (uint)trackdirs;
for (int i = 0; bitmask != 0; bitmask >>= 1, i++) {
- if (HASBIT(bitmask, i)) {
+ if (HASBIT(bitmask, 0)) {
if (best_track == INVALID_TRACKDIR) best_track = (Trackdir)i; // in case we don't find the path, just pick a track
frd.maxtracklen = (uint)-1;
frd.mindist = (uint)-1;