diff options
author | Michael W. Hudson <mwh@python.net> | 2002-03-05 15:42:48 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-03-05 15:42:48 (GMT) |
commit | 325573ce28ba7d09fb72506fb6a39f3385bf0116 (patch) | |
tree | df5612c942c7c4dafe4c432a4dfc6f7a4f900a9d | |
parent | c4562a89ea7ad46d6b7ab57481e4cf214e7a7b47 (diff) | |
download | cpython-325573ce28ba7d09fb72506fb6a39f3385bf0116.zip cpython-325573ce28ba7d09fb72506fb6a39f3385bf0116.tar.gz cpython-325573ce28ba7d09fb72506fb6a39f3385bf0116.tar.bz2 |
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.
-rw-r--r-- | Objects/longobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ _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]; } |