1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Merge pull request #3376 from IvanSavenko/uninitialized_fixes

Fix uninitialized memory access
This commit is contained in:
Ivan Savenko 2023-12-24 13:19:17 +02:00 committed by GitHub
commit 5fe5d81729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -13,14 +13,16 @@
using namespace Load;
Progress::Progress(): _progress(std::numeric_limits<Type>::min())
{
setupSteps(100);
}
Progress::Progress()
: Progress(100)
{}
Progress::Progress(int steps): _progress(std::numeric_limits<Type>::min())
Progress::Progress(int steps)
: _progress(std::numeric_limits<Type>::min())
, _target(std::numeric_limits<Type>::max())
, _step(std::numeric_limits<Type>::min())
, _maxSteps(steps)
{
setupSteps(steps);
}
Type Progress::get() const

View File

@ -33,6 +33,7 @@ Rewardable::Reward::Reward()
, heroLevel(0)
, manaDiff(0)
, manaPercentage(-1)
, manaOverflowFactor(0)
, movePoints(0)
, movePercentage(-1)
, primary(4, 0)