mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
_PyLong_Copy(): was creating a copy of the absolute value, but should
copy the sign too. Added a test to test_descr to ensure that it does. Bugfix candidate.
This commit is contained in:
parent
db30ac41de
commit
5329cdb3ce
2 changed files with 2 additions and 1 deletions
|
@ -63,7 +63,7 @@ _PyLong_Copy(PyLongObject *src)
|
|||
i = -(i);
|
||||
result = _PyLong_New(i);
|
||||
if (result != NULL) {
|
||||
result->ob_size = i;
|
||||
result->ob_size = src->ob_size;
|
||||
while (--i >= 0)
|
||||
result->ob_digit[i] = src->ob_digit[i];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue