From 325573ce28ba7d09fb72506fb6a39f3385bf0116 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Tue, 5 Mar 2002 15:42:48 +0000 Subject: [PATCH] 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. --- Objects/longobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/longobject.c b/Objects/longobject.c index 5b7a00aa9fcf..f3e7df713428 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]; } -- 2.47.3