commit | 5329cdb3cea9f76a8b758aa61058455a5bfb4506 | [log] [tgz] |
---|---|---|
author | Tim Peters <tim.peters@gmail.com> | Sat Mar 02 04:18:04 2002 +0000 |
committer | Tim Peters <tim.peters@gmail.com> | Sat Mar 02 04:18:04 2002 +0000 |
tree | 6cb30f325dd580aeb990393db29eb6876e8d0dd0 | |
parent | db30ac41de4e9e8412429720445ea4852c3c241f [diff] [blame] |
_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.
diff --git a/Objects/longobject.c b/Objects/longobject.c index 5b7a00a..f3e7df7 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c
@@ -63,7 +63,7 @@ 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]; }