fix: check if unit have too match commands

This commit is contained in:
pavanvo 2022-08-28 16:21:45 +04:00
parent 085edd203a
commit 339ff320cb
No known key found for this signature in database
GPG Key ID: 34C1C36681B4AD84
1 changed files with 3 additions and 1 deletions

View File

@ -1286,7 +1286,9 @@ void UnitType::sortCommandTypes(CommandTypes cts){
ctCores.resize(4);
for(int i = (int)ctToBasics.size(); i --> 0; ) {// we push it to basics
ctBasics[basicNulls[i]] = ctToBasics[i];
basicNulls.erase(basicNulls.begin() + i);
if(i < (int)basicNulls.size())
basicNulls.erase(basicNulls.begin() + i);
else printf("Unit: %s have too match core commands \n", this->getName().c_str());
}
}