From 7732f3955630ffa653ba765b9c9d939de3808e31 Mon Sep 17 00:00:00 2001
From: Ivan Savenko <saven.ivan@gmail.com>
Date: Sat, 23 Dec 2023 21:31:17 +0200
Subject: [PATCH] Fix potential uninitialized access - setupSteps depends on
 not yet initialized members

---
 lib/LoadProgress.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/LoadProgress.cpp b/lib/LoadProgress.cpp
index 70eadbdbb..0c6b6821e 100644
--- a/lib/LoadProgress.cpp
+++ b/lib/LoadProgress.cpp
@@ -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