From ee3202779ad5234f124658872430f82b694272ae Mon Sep 17 00:00:00 2001 From: rocky Date: Wed, 28 Jun 2017 18:39:05 -0400 Subject: [PATCH] A guard against badly formated bytecode --- uncompyle6/semantics/make_function.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uncompyle6/semantics/make_function.py b/uncompyle6/semantics/make_function.py index 447f21f8..be670950 100644 --- a/uncompyle6/semantics/make_function.py +++ b/uncompyle6/semantics/make_function.py @@ -411,7 +411,8 @@ def make_function2(self, node, isLambda, nested=1, codeNode=None): if code_has_star_star_arg(code): if argc > 0: self.write(', ') - self.write('**%s' % code.co_varnames[argc + kw_pairs]) + if argc + kw_pairs > 0: + self.write('**%s' % code.co_varnames[argc + kw_pairs]) if isLambda: self.write(": ")