Skip to content

Commit

Permalink
[fix] Refine getDistance for non-trivial targets
Browse files Browse the repository at this point in the history
  • Loading branch information
misonijnik committed Aug 2, 2023
1 parent 65f0524 commit 479d04f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Core/TargetManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ class TargetManager {

DistanceResult result =
distanceCalculator.getDistance(state, target->getBlock());

if (Done == result.result && (!isa<ReachBlockTarget>(target) ||
cast<ReachBlockTarget>(target)->isAtEnd())) {
result.result = Continue;
}

distances[&state][target] = result;

return result;
Expand Down

0 comments on commit 479d04f

Please sign in to comment.