Use an unsigned cast to avoid a warning in VC++.

This commit is contained in:
Guido van Rossum 1999-03-19 21:50:11 +00:00
parent 8f0fa9e47f
commit 481ac8811e
1 changed files with 2 additions and 1 deletions

View File

@ -939,7 +939,8 @@ array_fromfile(self, args)
size_t newbytes;
/* Be careful here about overflow */
if ((newlength = self->ob_size + n) <= 0 ||
(newbytes = newlength * itemsize) / itemsize != newlength)
(newbytes = newlength * itemsize) / itemsize !=
(size_t)newlength)
goto nomem;
PyMem_RESIZE(item, char, newbytes);
if (item == NULL) {