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 c7137df40b..cbca49524e 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -565,7 +565,7 @@ i_divmod(register long x, register long y,
return DIVMOD_ERROR;
}
/* (-sys.maxint-1)/-1 is the only overflow case. */
- if (y == -1 && x < 0 && x == -x)
+ if (y == -1 && x == LONG_MIN)
return DIVMOD_OVERFLOW;
xdivy = x / y;
xmody = x - xdivy * y;