diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-03-25 00:51:58 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-03-25 00:51:58 (GMT) |
commit | 53ff86ea5f0ed27f5eb5b966faf59dac298d6672 (patch) | |
tree | 38099f3cd794760f8fbbba800aad9757e5f75904 /Modules/_cursesmodule.c | |
parent | 6cbf90fc0fd552ec7689e5a885b278c05aa866ae (diff) | |
download | cpython-53ff86ea5f0ed27f5eb5b966faf59dac298d6672.zip cpython-53ff86ea5f0ed27f5eb5b966faf59dac298d6672.tar.gz cpython-53ff86ea5f0ed27f5eb5b966faf59dac298d6672.tar.bz2 |
Fix _curses.tiget*() functions: deny None to avoid a crash.
Fix the following calls: _curses.tigetflag(None), _curses.tigetnum(None),
_curses.tigetstr(None).
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r-- | Modules/_cursesmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 37ba95d..430ab17 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2466,7 +2466,7 @@ PyCurses_tigetflag(PyObject *self, PyObject *args) PyCursesSetupTermCalled; - if (!PyArg_ParseTuple(args, "z", &capname)) + if (!PyArg_ParseTuple(args, "s", &capname)) return NULL; return PyInt_FromLong( (long) tigetflag( capname ) ); @@ -2479,7 +2479,7 @@ PyCurses_tigetnum(PyObject *self, PyObject *args) PyCursesSetupTermCalled; - if (!PyArg_ParseTuple(args, "z", &capname)) + if (!PyArg_ParseTuple(args, "s", &capname)) return NULL; return PyInt_FromLong( (long) tigetnum( capname ) ); @@ -2492,7 +2492,7 @@ PyCurses_tigetstr(PyObject *self, PyObject *args) PyCursesSetupTermCalled; - if (!PyArg_ParseTuple(args, "z", &capname)) + if (!PyArg_ParseTuple(args, "s", &capname)) return NULL; capname = tigetstr( capname ); |