summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/longobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index e56602e..f7df699 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1702,8 +1702,9 @@ long_to_decimal_string(PyObject *aa)
digit hi = pin[i];
for (j = 0; j < size; j++) {
twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi;
- hi = z / _PyLong_DECIMAL_BASE;
- pout[j] = z - (twodigits)hi * _PyLong_DECIMAL_BASE;
+ hi = (digit)(z / _PyLong_DECIMAL_BASE);
+ pout[j] = (digit)(z - (twodigits)hi *
+ _PyLong_DECIMAL_BASE);
}
while (hi) {
pout[size++] = hi % _PyLong_DECIMAL_BASE;