Fixed bug with std::bad_alloc when using produce()
I'm not sure why it wasn't happening before, but it's fixed :)dev-ui
parent
c25b6ab472
commit
1f77efb9cb
|
@ -1544,8 +1544,10 @@ bool CScript::rProduce(CBotVar* var, CBotVar* result, int& exception, void* user
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(name[0] != 0) {
|
||||||
object->ReadProgram(0, static_cast<const char*>(name));
|
object->ReadProgram(0, static_cast<const char*>(name));
|
||||||
object->RunProgram(0);
|
object->RunProgram(0);
|
||||||
|
}
|
||||||
|
|
||||||
result->SetValInt(0); // no error
|
result->SetValInt(0); // no error
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue