bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements (GH-21850) (GH-22107)

(cherry picked from commit c51db0ea40)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-09-04 16:38:50 -07:00 committed by GitHub
parent 242eac1f04
commit d64d78be20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -3890,7 +3890,7 @@ compiler_dict(struct compiler *c, expr_ty e)
}
else {
if (elements == 0xFFFF) {
if (!compiler_subdict(c, e, i - elements, i)) {
if (!compiler_subdict(c, e, i - elements, i + 1)) {
return 0;
}
if (have_dict) {