diff --git a/Test/DejaFu/SCT/Internal.hs b/Test/DejaFu/SCT/Internal.hs index c0f5386..9e88e4e 100755 --- a/Test/DejaFu/SCT/Internal.hs +++ b/Test/DejaFu/SCT/Internal.hs @@ -111,8 +111,8 @@ findBacktrack backtrack = go [] [] where go _ bs _ _ = bs doBacktrack allThreads enabledThreads bs = - let tagged = zip [0..] $ tidTag (fst . _decision) 0 bs - idxs = [ (maximum is, u) + let tagged = reverse . zip [0..] $ tidTag (fst . _decision) 0 bs + idxs = [ (head is, u) | (u, n) <- enabledThreads , v <- allThreads , u /= v