Fix: BGE crashes when RunPythonCallBackList() is called with maxargcount != minargcount
This commit is contained in:
parent
dbb2b29bea
commit
bf6bde232d
Notes:
blender-bot
2023-02-14 09:12:05 +01:00
Referenced by issue #44507, Compilation issue VS2013
|
@ -84,9 +84,8 @@ static PyObject *CreatePythonTuple(unsigned int argcount, PyObject **arglist)
|
|||
void RunPythonCallBackList(PyObject *functionlist, PyObject **arglist, unsigned int minargcount, unsigned int maxargcount)
|
||||
{
|
||||
unsigned int size = PyList_Size(functionlist);
|
||||
PyObject *argTuples[(maxargcount - minargcount) + 1];
|
||||
|
||||
argTuples[0] = NULL;
|
||||
PyObject *argTuples[maxargcount - minargcount + 1];
|
||||
memset(argTuples, 0, sizeof(PyObject *) * (maxargcount - minargcount + 1));
|
||||
|
||||
for (unsigned int i = 0; i < size; ++i) {
|
||||
unsigned int funcargcount = 0;
|
||||
|
|
Loading…
Reference in New Issue