Kaydet (Commit) 6543e88d authored tarafından Guido van Rossum's avatar Guido van Rossum

Check for potential error returned by _ungetch().

üst 7d385294
......@@ -165,7 +165,8 @@ static PyObject *msvcrt_ungetch(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "c:ungetch", &ch))
return NULL;
_ungetch(ch);
if (_ungetch(ch) == EOF)
return PyErr_SetFromErrno(PyExc_IOError);
Py_INCREF(Py_None);
return Py_None;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment