Skip to content

Commit 464f468

Browse files
author
raymond.hettinger
committed
Bug #4495: Fix signed/unsigned warning (both namelen and tailen should be signed, not just namelen).
git-svn-id: http://svn.python.org/projects/python/branches/py3k@67477 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent f6cbf1d commit 464f468

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/traceback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ _Py_FindSourceFile(const char* filename, char* namebuf, size_t namelen, int open
171171
if (!PyUnicode_Check(v))
172172
continue;
173173
path = _PyUnicode_AsStringAndSize(v, &len);
174-
if (len + 1 + taillen >= (Py_ssize_t)namelen - 1)
174+
if (len + 1 + (Py_ssize_t)taillen >= (Py_ssize_t)namelen - 1)
175175
continue; /* Too long */
176176
strcpy(namebuf, path);
177177
if (strlen(namebuf) != len)

0 commit comments

Comments
 (0)