diff options
| -rw-r--r-- | miasm/core/sembuilder.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/miasm/core/sembuilder.py b/miasm/core/sembuilder.py index c51ce608..efd80ce4 100644 --- a/miasm/core/sembuilder.py +++ b/miasm/core/sembuilder.py @@ -336,10 +336,11 @@ class SemBuilder(object): ctx=ast.Load())], ctx=ast.Load()))) - ret = ast.Module([ast.FunctionDef(name=fc_ast.name, - args=fc_ast.args, - body=body, - decorator_list=[])]) + ret = ast.parse('') + ret.body = [ast.FunctionDef(name=fc_ast.name, + args=fc_ast.args, + body=body, + decorator_list=[])] # To display the generated function, use codegen.to_source # codegen: https://github.com/andreif/codegen |