Kaydet (Commit) 325573ce authored tarafından Michael W. Hudson's avatar Michael W. Hudson

backport tim_one's checkin of

    revision 1.114 of longobject.c

_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.
üst c4562a89
...@@ -63,7 +63,7 @@ _PyLong_Copy(PyLongObject *src) ...@@ -63,7 +63,7 @@ _PyLong_Copy(PyLongObject *src)
i = -(i); i = -(i);
result = _PyLong_New(i); result = _PyLong_New(i);
if (result != NULL) { if (result != NULL) {
result->ob_size = i; result->ob_size = src->ob_size;
while (--i >= 0) while (--i >= 0)
result->ob_digit[i] = src->ob_digit[i]; result->ob_digit[i] = src->ob_digit[i];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment