Antoine Pitrou <pit...@free.fr> added the comment:

The fix for _PyLong_Copy is the following:

diff --git a/Objects/longobject.c b/Objects/longobject.c
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -156,7 +156,7 @@ PyObject *
     if (i < 0)
         i = -(i);
     if (i < 2) {
-        sdigit ival = src->ob_digit[0];
+        sdigit ival = (i == 0) ? 0 : src->ob_digit[0];
         if (Py_SIZE(src) < 0)
             ival = -ival;
         CHECK_SMALL_INT(ival);

----------
assignee: mark.dickinson -> 

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14630>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to