diff Python/traceback.c @ 49924:d172dd8d9e09

Bug #4495: Fix signed/unsigned warning (both namelen and tailen should be signed, not just namelen).
author Raymond Hettinger <python@rcn.com>
date Tue, 02 Dec 2008 20:59:48 +0000
parents 0b7e023803fb
children 87fbbf22adf3
line wrap: on
line diff
--- a/Python/traceback.c	Tue Dec 02 17:31:14 2008 +0000
+++ b/Python/traceback.c	Tue Dec 02 20:59:48 2008 +0000
@@ -171,7 +171,7 @@
 		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)