diff --git a/tracks/path.lisp b/tracks/path.lisp index eb5a1bd..ac3e0d5 100644 --- a/tracks/path.lisp +++ b/tracks/path.lisp @@ -21,7 +21,7 @@ (loop with contp = t while (and (> (hash-table-count unknown) 0) contp) do (multiple-value-bind (u d) (shortest-unseen) (remhash u unknown) - (if (>= d most-positive-fixnum) + (if (or (>= d most-positive-fixnum) (equalp u to)) (setf contp nil) (loop for (v . len) in (direct-next tdb u t) for alt = (+ d len) when (< alt (gethash v dist)) do