summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;