Skip to content

Commit b32b081

Browse files
authored
[GEN][ZH] Suppress compile warning about buffer overrun while writing to 'm_structuresToRepair' in AIPlayer::repairStructure() (#1139)
1 parent c2b8a73 commit b32b081

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Generals/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ void AIPlayer::repairStructure(ObjectID structure)
19721972
return;
19731973
}
19741974
}
1975-
if (m_structuresInQueue==MAX_STRUCTURES_TO_REPAIR) {
1975+
if (m_structuresInQueue>=MAX_STRUCTURES_TO_REPAIR) {
19761976
DEBUG_LOG(("Structure repair queue is full, ignoring repair request. JBA\n"));
19771977
return;
19781978
}

GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ void AIPlayer::repairStructure(ObjectID structure)
23012301
return;
23022302
}
23032303
}
2304-
if (m_structuresInQueue==MAX_STRUCTURES_TO_REPAIR) {
2304+
if (m_structuresInQueue>=MAX_STRUCTURES_TO_REPAIR) {
23052305
DEBUG_LOG(("Structure repair queue is full, ignoring repair request. JBA\n"));
23062306
return;
23072307
}

0 commit comments

Comments
 (0)