The tail end of x_sub implicitly assumed that an unsigned short

contains 16 bits.  Not true on Cray J90.
This commit is contained in:
Tim Peters 2000-07-08 02:26:47 +00:00
parent a90b23c571
commit 43f04a36cf
1 changed files with 1 additions and 0 deletions

View File

@ -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)