|
|
@ -474,6 +474,12 @@ void plPythonSDLModifier::IPythonVarToSDL(plStateDataRecord* state, const char* |
|
|
|
int count = PyTuple_Size(pyVar); |
|
|
|
int count = PyTuple_Size(pyVar); |
|
|
|
plSimpleVarDescriptor::Type type = var->GetSimpleVarDescriptor()->GetType(); |
|
|
|
plSimpleVarDescriptor::Type type = var->GetSimpleVarDescriptor()->GetType(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Ensure that variable length arrays match.
|
|
|
|
|
|
|
|
if (var->GetSimpleVarDescriptor()->IsVariableLength()) { |
|
|
|
|
|
|
|
if (var->GetCount() != count) |
|
|
|
|
|
|
|
var->Alloc(count); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < count; i++) |
|
|
|
for (int i = 0; i < count; i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
PyObject* pyVarItem = PyTuple_GetItem(pyVar, i); |
|
|
|
PyObject* pyVarItem = PyTuple_GetItem(pyVar, i); |
|
|
|