[3.10] bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before a no-arg opcode (GH-29480) (GH-29506)

This commit is contained in:
Irit Katriel 2021-11-09 22:05:30 +00:00 committed by GitHub
parent d29f591dd6
commit c5bfb88eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View file

@ -428,6 +428,7 @@ def _unpack_opargs(code):
extended_arg = (arg << 8) if op == EXTENDED_ARG else 0
else:
arg = None
extended_arg = 0
yield (i, op, arg)
def findlabels(code):