collide: Fix typo causing compile error on Windows with Python 3.10

This commit is contained in:
rdb 2021-08-30 21:27:53 +02:00
parent 3d386d2d63
commit cb4bcbe67e

View File

@ -69,7 +69,7 @@ __setstate__(PyObject *state) {
_this->set_name(std::string(data, len));
_this->set_respect_prev_transform(PyTuple_GET_ITEM(state, 1) != Py_False);
size_t num_colliders = (ssize_t)PyLong_AsLong(PyTuple_GET_ITEM(state, 2));
size_t num_colliders = (size_t)PyLong_AsLong(PyTuple_GET_ITEM(state, 2));
for (size_t i = 0; i < num_colliders; ++i) {
NodePath *collider = (NodePath *)DtoolInstance_VOID_PTR(PyTuple_GET_ITEM(state, i * 2 + 3));