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

This commit is contained in:
Irit Katriel 2021-11-09 20:07:38 +00:00 committed by GitHub
parent bcc4e46832
commit cb414cf0e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View file

@ -523,6 +523,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):