mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 12:32:34 +02:00
Fixed potential OOS
This commit is contained in:
@@ -427,8 +427,10 @@ namespace
|
|||||||
const Unit * targetUnit,
|
const Unit * targetUnit,
|
||||||
bool tryQueue,
|
bool tryQueue,
|
||||||
int unitCommandGroupId, bool isMove) const {
|
int unitCommandGroupId, bool isMove) const {
|
||||||
|
std::pair < CommandResult, string > result(crFailUndefined, "");
|
||||||
|
|
||||||
if (this->pauseNetworkCommands == true) {
|
if (this->pauseNetworkCommands == true) {
|
||||||
return std::pair < CommandResult, string >(crFailUndefined, "");
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
|
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).
|
||||||
@@ -438,8 +440,6 @@ namespace
|
|||||||
extractFileFromDirectoryPath(__FILE__).
|
extractFileFromDirectoryPath(__FILE__).
|
||||||
c_str(), __FUNCTION__, __LINE__);
|
c_str(), __FUNCTION__, __LINE__);
|
||||||
|
|
||||||
std::pair < CommandResult, string > result(crFailUndefined, "");
|
|
||||||
|
|
||||||
if (selection->isEmpty() == false) {
|
if (selection->isEmpty() == false) {
|
||||||
Vec2i
|
Vec2i
|
||||||
refPos,
|
refPos,
|
||||||
@@ -684,7 +684,7 @@ namespace
|
|||||||
}
|
}
|
||||||
/*throw
|
/*throw
|
||||||
megaglest_runtime_error(szBuf);*/
|
megaglest_runtime_error(szBuf);*/
|
||||||
return result;
|
return std::pair<CommandResult, string>(crFailUndefined, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user