fix a few areas that vc++ 2012 pointed to as potential bugs
This commit is contained in:
parent
9a7fba2842
commit
4499308888
|
@ -1160,7 +1160,7 @@ void AiRuleProduce::produceSpecific(const ProduceTask *pt){
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] producers.size() = %d, producerIndex = %d, pIndex = %d, producersDefaultCommandType.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,producers.size(),producerIndex,pIndex,producersDefaultCommandType.size());
|
||||
|
||||
if(ai->outputAIBehaviourToConsole()) printf("produceSpecific giveCommand to unit [%s] commandType [%s]\n",aiInterface->getMyUnit(producerIndex)->getType()->getName().c_str(),defCt->getName().c_str());
|
||||
if(ai->outputAIBehaviourToConsole()) printf("produceSpecific giveCommand to unit [%s] commandType [%s]\n",aiInterface->getMyUnit(producerIndex)->getType()->getName().c_str(),(defCt != NULL ? defCt->getName().c_str() : "n/a"));
|
||||
if(aiInterface->isLogLevelEnabled(4) == true) {
|
||||
char szBuf[8096]="";
|
||||
snprintf(szBuf,8096,"produceSpecific giveCommand to unit [%s] commandType [%s]",aiInterface->getMyUnit(producerIndex)->getType()->getName().c_str(),(defCt != NULL ? defCt->getName().c_str() : "(null)"));
|
||||
|
|
|
@ -1085,7 +1085,6 @@ bool NetworkMessageLaunch::receive(Socket* socket) {
|
|||
}
|
||||
for(unsigned int i = 0; i < maxFactionCRCCount; ++i) {
|
||||
data.factionNameList[i].nullTerminate();
|
||||
data.networkPlayerUUID[i].nullTerminate();
|
||||
}
|
||||
|
||||
data.scenario.nullTerminate();
|
||||
|
|
|
@ -2336,6 +2336,9 @@ void ServerInterface::broadcastGameSetup(GameSettings *gameSettingsBuffer, bool
|
|||
}
|
||||
}
|
||||
if(setGameSettingsBuffer == true) {
|
||||
if(gameSettingsBuffer == NULL) {
|
||||
throw megaglest_runtime_error("gameSettingsBuffer == NULL");
|
||||
}
|
||||
validateGameSettings(gameSettingsBuffer);
|
||||
//setGameSettings(gameSettingsBuffer,false);
|
||||
MutexSafeWrapper safeMutex(serverSynchAccessor,CODE_AT_LINE);
|
||||
|
|
|
@ -1771,7 +1771,7 @@ void UnitUpdater::updateRepair(Unit *unit, int frameIndex) {
|
|||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugUnitCommands).enabled) SystemFlags::OutputDebug(SystemFlags::debugUnitCommands,"In [%s::%s Line: %d] rct = %p\n",__FILE__,__FUNCTION__,__LINE__,rct);
|
||||
|
||||
Unit *repaired = map->getCell(command->getPos())->getUnitWithEmptyCellMap(fLand);
|
||||
Unit *repaired = (command != NULL ? map->getCell(command->getPos())->getUnitWithEmptyCellMap(fLand) : NULL);
|
||||
if(repaired == NULL) {
|
||||
repaired = map->getCell(command->getPos())->getUnit(fLand);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue