Compare long long with long long

Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
This commit is contained in:
Andrew Murray 2023-06-17 14:39:34 +10:00 committed by GitHub
parent 7044038e70
commit fd9bea271a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -880,7 +880,7 @@ font_render(FontObject *self, PyObject *args) {
width += stroke_width * 2 + ceil(x_start);
height += stroke_width * 2 + ceil(y_start);
if (max_image_pixels != Py_None) {
if ((long long)width * height > PyLong_AsLong(max_image_pixels) * 2) {
if ((long long)width * height > PyLong_AsLongLong(max_image_pixels) * 2) {
PyMem_Del(glyph_info);
return Py_BuildValue("O(ii)(ii)", Py_None, width, height, 0, 0);
}