diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/arraymodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index ba5105c..7bc7e73 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -99,12 +99,12 @@ b_setitem(ap, i, v) the overflow checking */ if (!PyArg_Parse(v, "h;array item must be integer", &x)) return -1; - else if (x < CHAR_MIN) { + else if (x < -128) { PyErr_SetString(PyExc_OverflowError, "signed char is less than minimum"); return -1; } - else if (x > CHAR_MAX) { + else if (x > 127) { PyErr_SetString(PyExc_OverflowError, "signed char is greater than maximum"); return -1; |