mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r8725) -Fix (r8712): test the first bit of the bitmask, not the nth, as we are shifting the bitmask.
This commit is contained in:
parent
59284954ae
commit
f3dc5596ad
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user