about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/analysis/dse.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/miasm2/analysis/dse.py b/miasm2/analysis/dse.py
index 7f132c25..4762dd08 100644
--- a/miasm2/analysis/dse.py
+++ b/miasm2/analysis/dse.py
@@ -531,7 +531,10 @@ class DSEPathConstraint(DSEEngine):
         elif self._produce_solution_strategy == self.PRODUCE_SOLUTION_PATH_COV:
             # Decision based on path coverage
             # -> produce a solution if the current path has never been take
-            key = tuple(self._history + [destination])
+            # Note: we are taking all steps of the current history but the last
+            # one ([:-1]) because destination is a step that will replace the
+            # one we just made.
+            key = tuple(self._history[:-1] + [destination])
         else:
             raise ValueError("Unknown produce solution strategy")