X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/pyke/blobdiff_plain/c6b05f1ffdddaf4ac857cdbcb00ceff098fca489..b0783435d0481f5034c46c65a0802ca25f646058:/catacomb.c diff --git a/catacomb.c b/catacomb.c index daa404a..e24e5ec 100644 --- a/catacomb.c +++ b/catacomb.c @@ -76,7 +76,8 @@ PyObject *mexp_common(PyObject *me, PyObject *arg, arg = PyTuple_GetItem(arg, 0); Py_INCREF(arg); if (!PySequence_Check(arg)) TYERR("not a sequence"); - n = PySequence_Size(arg); if (!n) { z = id(me); goto end; } + n = PySequence_Size(arg); if (n < 0) goto end; + if (!n) { z = id(me); goto end; } x = PySequence_GetItem(arg, 0); if (PySequence_Check(x)) flat = 0;