From: Christian Heimes Date: Mon, 10 Dec 2007 15:39:09 +0000 (+0000) Subject: Stupid save all didn't safe it all ... X-Git-Tag: v2.6a1~889 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61927fc0492becdc54fa4d23db9f90c79d165206;p=python Stupid save all didn't safe it all ... --- diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 982c45879e..e110ed8b09 100755 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -214,13 +214,14 @@ msvcrt_putwch(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "u#:putwch", &ch, &size)) return NULL; - if (size == 1) - _putwch(*ch); - Py_RETURN_NONE; - else { + if (size == 0) { PyErr_SetString(PyExc_ValueError, - "Expected unicode of length 1"); + "Expected unicode string of length 1"); + return NULL; } + _putwch(*ch); + Py_RETURN_NONE; + } static PyObject *