diff --git a/decompiler/__init__.py b/decompiler/__init__.py index 0ef6db63..84372903 100644 --- a/decompiler/__init__.py +++ b/decompiler/__init__.py @@ -633,7 +633,12 @@ def print_menu(self, ast): self.indent() self.write("set %s" % ast.set) - for label, condition, block in ast.items: + if hasattr(ast, "item_arguments"): + item_arguments = ast.item_arguments + else: + item_arguments = [None] * len(ast.items) + + for (label, condition, block), arguments in zip(ast.items, item_arguments): if self.translator: label = self.translator.strings.get(label, label) @@ -642,6 +647,9 @@ def print_menu(self, ast): self.indent() self.write('"%s"' % string_escape(label)) + if arguments is not None: + self.write(reconstruct_arginfo(arguments)) + if block is not None: if isinstance(condition, unicode): self.write(" if %s" % condition)