diff --git a/extra/path-finding/path-finding.factor b/extra/path-finding/path-finding.factor index 4b11616c20..1f6b4f5cc6 100644 --- a/extra/path-finding/path-finding.factor +++ b/extra/path-finding/path-finding.factor @@ -40,7 +40,7 @@ TUPLE: (astar) astar goal origin in-open-set open-set ; : ?set-g ( origin node astar -- ) [ cost-through ] 3keep [ swap ] 2dip - 3dup astar>> g>> at [ 1/0. ] unless* > [ 4drop ] [ set-g ] if ; + 3dup astar>> g>> at [ 1/0. ] unless* >= [ 4drop ] [ set-g ] if ; : build-path ( target astar -- path ) [ over ] [ over [ [ origin>> at ] keep ] dip ] produce 2nip reverse ;