PyOS_CheckStack() returns 1 when failing, not -1.

This commit is contained in:
Guido van Rossum 2000-08-30 15:53:50 +00:00
parent eacc4fc5e6
commit 9c0a99ec1a
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ PyObject_Compare(PyObject *v, PyObject *w)
int result;
#if defined(USE_STACKCHECK)
if (PyOS_CheckStack() < 0) {
if (PyOS_CheckStack()) {
PyErr_SetString(PyExc_MemoryError, "Stack overflow");
return -1;
}