summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2022-10-18 16:18:38 (GMT)
committerGitHub <noreply@github.com>2022-10-18 16:18:38 (GMT)
commitc051d55ddb29c4ff7b1fcc65971535f78369ffc0 (patch)
tree256633e998ca1083f244d3d0ce5ff3c74aae3b4c /Python/compile.c
parentdebacd9ad51eaeedac5517404de5ead3f2258c22 (diff)
downloadcpython-c051d55ddb29c4ff7b1fcc65971535f78369ffc0.zip
cpython-c051d55ddb29c4ff7b1fcc65971535f78369ffc0.tar.gz
cpython-c051d55ddb29c4ff7b1fcc65971535f78369ffc0.tar.bz2
gh-98390: Fix source locations of boolean sub-expressions (GH-98396)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 5fbf6fe..4d5b41a 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2953,7 +2953,7 @@ compiler_jump_if(struct compiler *c, location *ploc,
/* general implementation */
VISIT(c, expr, e);
- ADDOP_JUMP(c, *ploc, cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next);
+ ADDOP_JUMP(c, LOC(e), cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next);
return 1;
}