diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-12-09 12:53:42 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-12-09 12:53:42 +0100 |
| commit | 43d49bbd745124a9e412bc54dbeebbaf2544a334 (patch) | |
| tree | aab491b8764cbd5e1f2990284e0c50e16849f2b4 /miasm2/expression/expression.py | |
| parent | a2e6d20b83e66a1b049abec33317ff2e97d3943a (diff) | |
| download | miasm-43d49bbd745124a9e412bc54dbeebbaf2544a334.tar.gz miasm-43d49bbd745124a9e412bc54dbeebbaf2544a334.zip | |
Expr: fix replace_expr args
Diffstat (limited to 'miasm2/expression/expression.py')
| -rw-r--r-- | miasm2/expression/expression.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py index 0e4b7629..4dc16f75 100644 --- a/miasm2/expression/expression.py +++ b/miasm2/expression/expression.py @@ -313,13 +313,10 @@ class Expr(object): def __deepcopy__(self, _): return self.copy() - def replace_expr(self, dct=None): + def replace_expr(self, dct): """Find and replace sub expression using dct - @dct: dictionary of Expr -> * + @dct: dictionary associating replaced Expr to its new Expr value """ - if not dct: - return self - return self.visit(lambda expr: dct.get(expr, expr)) def canonize(self): |