summaryrefslogtreecommitdiff
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-28 14:48:19 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-28 14:48:19 +0300
commitf5a86603829104d675112c1aa35f4a7bdd32110e (patch)
treef3427e72d0382510cc719e3817782ae290ab91ad /Objects/codeobject.c
parent95de54494fb75a30f417c5bba1d0db4d54f57d29 (diff)
parentc7aaeb9022c01fbc190a6c6eb9df9cf7b0c14347 (diff)
downloadcpython-f5a86603829104d675112c1aa35f4a7bdd32110e.tar.gz
Issue #27138: Regenerate Python/importlib_external.h.
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 964ae62146..f089f75b62 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -694,7 +694,8 @@ PyCode_Addr2Line(PyCodeObject *co, int addrq)
addr += *p++;
if (addr > addrq)
break;
- line += *p++;
+ line += (signed char)*p;
+ p++;
}
return line;
}
@@ -729,17 +730,19 @@ _PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds)
if (addr + *p > lasti)
break;
addr += *p++;
- if (*p)
+ if ((signed char)*p)
bounds->ap_lower = addr;
- line += *p++;
+ line += (signed char)*p;
+ p++;
--size;
}
if (size > 0) {
while (--size >= 0) {
addr += *p++;
- if (*p++)
+ if ((signed char)*p)
break;
+ p++;
}
bounds->ap_upper = addr;
}