summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-10-04 14:07:21 (GMT)
committerGitHub <noreply@github.com>2021-10-04 14:07:21 (GMT)
commit1670d590fa6b817e0d3f091ea12aee9ae744875a (patch)
tree1856c19ebe15d60e7d3a30732161fb8832548180 /Objects/frameobject.c
parentb5499784ec0aa24c8f0d91f2317cc53b7743ada9 (diff)
downloadcpython-1670d590fa6b817e0d3f091ea12aee9ae744875a.zip
cpython-1670d590fa6b817e0d3f091ea12aee9ae744875a.tar.gz
cpython-1670d590fa6b817e0d3f091ea12aee9ae744875a.tar.bz2
[3.10] bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720). (GH-28721)
(cherry picked from commit 252b7bcb236dc261f3af1275bc90f9a303d9648f)
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 8974d37..d02cf9d 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -275,8 +275,8 @@ marklines(PyCodeObject *code, int len)
}
while (PyLineTable_NextAddressRange(&bounds)) {
- assert(bounds.ar_start/2 < len);
- linestarts[bounds.ar_start/2] = bounds.ar_line;
+ assert(bounds.ar_start/(int)sizeof(_Py_CODEUNIT) < len);
+ linestarts[bounds.ar_start/sizeof(_Py_CODEUNIT)] = bounds.ar_line;
}
return linestarts;
}