diff --git a/Objects/longobject.c b/Objects/longobject.c index 3f9837fc935..70d8cfc6a7d 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -3522,7 +3522,7 @@ fast_mod(PyLongObject *a, PyLongObject *b) mod = right - 1 - (left - 1) % right; } - return PyLong_FromLong(mod * Py_SIZE(b)); + return PyLong_FromLong(mod * (sdigit)Py_SIZE(b)); } /* Fast floor division for single-digit longs. */