diff options
Diffstat (limited to 'Objects/longobject.c')
| -rw-r--r-- | Objects/longobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 84fc552..85d1c66 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -606,8 +606,11 @@ long_compare(a, b) ; if (i < 0) sign = 0; - else + else { sign = (int)a->ob_digit[i] - (int)b->ob_digit[i]; + if (a->ob_size < 0) + sign = -sign; + } } return sign < 0 ? -1 : sign > 0 ? 1 : 0; } |
