diff --git a/lib/Core/TargetManager.h b/lib/Core/TargetManager.h index 11cba8bfc9..11f45b90cf 100644 --- a/lib/Core/TargetManager.h +++ b/lib/Core/TargetManager.h @@ -120,6 +120,12 @@ class TargetManager { DistanceResult result = distanceCalculator.getDistance(state, target->getBlock()); + + if (Done == result.result && (!isa(target) || + cast(target)->isAtEnd())) { + result.result = Continue; + } + distances[&state][target] = result; return result;