(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:
rubidium 2007-02-14 09:23:52 +00:00
parent 59284954ae
commit f3dc5596ad
1 changed files with 1 additions and 1 deletions

View File

@ -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;