diff options
-rw-r--r-- | Objects/frameobject.c | 4 | ||||
-rw-r--r-- | Python/compile.c | 2 |
2 files changed, 3 insertions, 3 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; } diff --git a/Python/compile.c b/Python/compile.c index b007859..97aa224 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -6619,7 +6619,7 @@ static int assemble_line_range(struct assembler *a) { int ldelta, bdelta; - bdelta = (a->a_offset - a->a_lineno_start) * 2; + bdelta = (a->a_offset - a->a_lineno_start) * sizeof(_Py_CODEUNIT); if (bdelta == 0) { return 1; } |