summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-12-02 20:59:48 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-12-02 20:59:48 (GMT)
commit048690410f6ad62327e6cde573d6e8b702ea708b (patch)
treed699f31679a7c7d51fb35333e3af513a362c3bf6 /Python
parent5b78dd9fada0d671e31fc6f947b58d6bfd1e3197 (diff)
downloadcpython-048690410f6ad62327e6cde573d6e8b702ea708b.zip
cpython-048690410f6ad62327e6cde573d6e8b702ea708b.tar.gz
cpython-048690410f6ad62327e6cde573d6e8b702ea708b.tar.bz2
Bug #4495: Fix signed/unsigned warning (both namelen and tailen should be signed, not just namelen).
Diffstat (limited to 'Python')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 63ecc3c..42bbd53 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -171,7 +171,7 @@ _Py_FindSourceFile(const char* filename, char* namebuf, size_t namelen, int open
if (!PyUnicode_Check(v))
continue;
path = _PyUnicode_AsStringAndSize(v, &len);
- if (len + 1 + taillen >= (Py_ssize_t)namelen - 1)
+ if (len + 1 + (Py_ssize_t)taillen >= (Py_ssize_t)namelen - 1)
continue; /* Too long */
strcpy(namebuf, path);
if (strlen(namebuf) != len)