summaryrefslogtreecommitdiff
path: root/Objects/intobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/intobject.c')
-rw-r--r--Objects/intobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c
index 8a8972c711..dce569a6ef 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -1117,7 +1117,7 @@ int_to_decimal_string(PyIntObject *v) {
long n = v->ob_ival;
unsigned long absn;
p = bufend = buf + sizeof(buf);
- absn = n < 0 ? -(unsigned long)n : n;
+ absn = n < 0 ? 0UL - n : n;
do {
*--p = '0' + absn % 10;
absn /= 10;