--- Objects/longobject.c.orig 2015-09-24 01:46:12.551309822 +0900
+++ Objects/longobject.c 2015-09-24 01:43:34.063231227 +0900
@@ -241,14 +241,15 @@
if (ival < 0) {
/* negate: can't write this as abs_ival = -ival since that
invokes undefined behaviour when ival is LONG_MIN */
abs_ival = 0U-(unsigned long)ival;
sign = -1;
}
else {
+ if(ival == 0) sign = 0;
abs_ival = (unsigned long)ival;
}
/* Fast path for single-digit ints */
if (!(abs_ival >> PyLong_SHIFT)) {
v = _PyLong_New(1);
if (v) {