From: Victor Stinner Date: Thu, 8 Mar 2012 01:08:48 +0000 (+0100) Subject: Close #14223: curses.addch() is no more limited to the range 0-255 when the X-Git-Tag: v3.3.0a2~263 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f40860944aab8ffbd99088fd483f5124c5046d0;p=python Close #14223: curses.addch() is no more limited to the range 0-255 when the Python curses is not linked to libncursesw. It was a regression introduced in Python 3.3a1. --- diff --git a/Misc/NEWS b/Misc/NEWS index 451b803b67..91acc455f1 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -22,6 +22,10 @@ Core and Builtins Library ------- +- Issue #14223: curses.addch() is no more limited to the range 0-255 when the + Python curses is not linked to libncursesw. It was a regression introduced + in Python 3.3a1. + - Issue #14168: Check for presence of Element._attrs in minidom before accessing it. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 64178d7aef..40b6e68aae 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -340,7 +340,7 @@ PyCurses_ConvertToCchar_t(PyCursesWindowObject *win, PyObject *obj, #endif { *ch = (chtype)value; - if ((long)*ch != value || value < 0 || value > 255) { + if ((long)*ch != value) { PyErr_Format(PyExc_OverflowError, "byte doesn't fit in chtype"); return 0;