summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-10 15:39:09 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-10 15:39:09 (GMT)
commit61927fc0492becdc54fa4d23db9f90c79d165206 (patch)
treec1dee7498515107965c87a532fe872f44257cd98 /PC
parent7c7f6afa928c24221f8463a1aa71fc6ef532d29e (diff)
downloadcpython-61927fc0492becdc54fa4d23db9f90c79d165206.zip
cpython-61927fc0492becdc54fa4d23db9f90c79d165206.tar.gz
cpython-61927fc0492becdc54fa4d23db9f90c79d165206.tar.bz2
Stupid save all didn't safe it all ...
Diffstat (limited to 'PC')
-rwxr-xr-xPC/msvcrtmodule.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index 982c458..e110ed8 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 *