Skip to content

Commit da33465

Browse files
authored
[GEN][ZH] Prevent using uninitialized memory 'delta' in Dict::ensureUnique() (#1131)
1 parent 2e8a2d1 commit da33465

File tree

2 files changed

+2
-2
lines changed
  • GeneralsMD/Code/GameEngine/Source/Common
  • Generals/Code/GameEngine/Source/Common

2 files changed

+2
-2
lines changed

Generals/Code/GameEngine/Source/Common/Dict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Dict::DictPair *Dict::ensureUnique(int numPairsNeeded, Bool preserveData, DictPa
182182
}
183183
}
184184

185-
Int delta;
185+
Int delta = 0;
186186
if (pairToTranslate && m_data)
187187
delta = pairToTranslate - m_data->peek();
188188

GeneralsMD/Code/GameEngine/Source/Common/Dict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Dict::DictPair *Dict::ensureUnique(int numPairsNeeded, Bool preserveData, DictPa
182182
}
183183
}
184184

185-
Int delta;
185+
Int delta = 0;
186186
if (pairToTranslate && m_data)
187187
delta = pairToTranslate - m_data->peek();
188188

0 commit comments

Comments
 (0)