diff --git a/libImaging/Storage.c b/libImaging/Storage.c index 76a66c2a5..243d2f4f6 100644 --- a/libImaging/Storage.c +++ b/libImaging/Storage.c @@ -369,7 +369,7 @@ ImagingNew(const char* mode, int xsize, int ysize) } else bytes = strlen(mode); /* close enough */ - if ((long) xsize * ysize * bytes <= THRESHOLD) { + if ((Py_ssize_t) xsize * ysize * bytes <= THRESHOLD) { im = ImagingNewBlock(mode, xsize, ysize); if (im) return im;