Limit string size on one-character-strings. Fixes #480384.

This commit is contained in:
Martin v. Löwis 2001-11-11 14:49:15 +00:00
parent 00ff10cae4
commit 43f2dc6251
1 changed files with 2 additions and 2 deletions

View File

@ -1654,7 +1654,7 @@ PyCurses_EraseChar(PyObject *self, PyObject *args)
ch = erasechar();
return PyString_FromString(&ch);
return PyString_FromStringAndSize(&ch, 1);
}
static PyObject *
@ -2012,7 +2012,7 @@ PyCurses_KillChar(PyObject *self, PyObject *args)
ch = killchar();
return PyString_FromString(&ch);
return PyString_FromStringAndSize(&ch, 1);
}
static PyObject *