64 bit proof ImagingNew

This commit is contained in:
Christoph Gohlke 2013-03-08 11:03:43 -08:00
parent 8f63a27c65
commit cee97b83cc

View File

@ -369,7 +369,7 @@ ImagingNew(const char* mode, int xsize, int ysize)
} else } else
bytes = strlen(mode); /* close enough */ bytes = strlen(mode); /* close enough */
if ((long) xsize * ysize * bytes <= THRESHOLD) { if ((Py_ssize_t) xsize * ysize * bytes <= THRESHOLD) {
im = ImagingNewBlock(mode, xsize, ysize); im = ImagingNewBlock(mode, xsize, ysize);
if (im) if (im)
return im; return im;