Skip to content

Commit 1b1682d

Browse files
authored
[GEN][ZH] Initialize supplyTruck variable (#820)
1 parent 62719fd commit 1b1682d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,9 +1042,9 @@ void AIPlayer::onUnitProduced( Object *factory, Object *unit )
10421042
{
10431043
Bool found = false;
10441044
// TheSuperHackers @fix Mauller 26/04/2025 Fixes uninitialized variable.
1045-
// To keep retail compatibility this needs to remain uninitialized in VS6 builds.
1045+
// To keep retail compatibility it needs to be set true in VS6 builds.
10461046
#if defined(_MSC_VER) && _MSC_VER < 1300
1047-
Bool supplyTruck;
1047+
Bool supplyTruck = true;
10481048
#else
10491049
Bool supplyTruck = false;
10501050
#endif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,9 @@ void AIPlayer::onUnitProduced( Object *factory, Object *unit )
10491049
{
10501050
Bool found = false;
10511051
// TheSuperHackers @fix Mauller 26/04/2025 Fixes uninitialized variable.
1052-
// To keep retail compatibility this needs to remain uninitialized in VS6 builds.
1052+
// To keep retail compatibility it needs to be set true in VS6 builds.
10531053
#if defined(_MSC_VER) && _MSC_VER < 1300
1054-
Bool supplyTruck;
1054+
Bool supplyTruck = true;
10551055
#else
10561056
Bool supplyTruck = false;
10571057
#endif

0 commit comments

Comments
 (0)