summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2000-07-08 02:26:47 (GMT)
committerTim Peters <tim.peters@gmail.com>2000-07-08 02:26:47 (GMT)
commit43f04a36cf4e809a8baa3a895268b527bfd6254c (patch)
tree155b4a1f02ba08b53fcb75f14d8aaba4572bc0bf /Objects
parenta90b23c5712ea1a73fcfdac00e9ebbac2956a632 (diff)
downloadcpython-43f04a36cf4e809a8baa3a895268b527bfd6254c.zip
cpython-43f04a36cf4e809a8baa3a895268b527bfd6254c.tar.gz
cpython-43f04a36cf4e809a8baa3a895268b527bfd6254c.tar.bz2
The tail end of x_sub implicitly assumed that an unsigned short
contains 16 bits. Not true on Cray J90.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index df69a6d..a28dbaf 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1048,6 +1048,7 @@ x_sub(PyLongObject *a, PyLongObject *b)
borrow = a->ob_digit[i] - borrow;
z->ob_digit[i] = borrow & MASK;
borrow >>= SHIFT;
+ borrow &= 1; /* Keep only one sign bit */
}
assert(borrow == 0);
if (sign < 0)