diff options
-rw-r--r-- | Modules/arraymodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 48986c4..6aa981d 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -185,9 +185,7 @@ in bounds; that's the responsibility of the caller. static PyObject * b_getitem(arrayobject *ap, Py_ssize_t i) { - long x = ((char *)ap->ob_item)[i]; - if (x >= 128) - x -= 256; + long x = ((signed char *)ap->ob_item)[i]; return PyLong_FromLong(x); } |