gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465)

Fixes a typo in d2e2e53.
This commit is contained in:
neonene 2023-06-08 04:46:00 +09:00 committed by GitHub
parent fbdee000de
commit 5394bf92aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2067,7 +2067,7 @@ math_trunc(PyObject *module, PyObject *x)
return PyFloat_Type.tp_as_number->nb_int(x);
}
if (_PyType_IsReady(Py_TYPE(x))) {
if (!_PyType_IsReady(Py_TYPE(x))) {
if (PyType_Ready(Py_TYPE(x)) < 0)
return NULL;
}