mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-29 23:22:04 +00:00
Fix progress percentage calculation broken in recent commit
Multiply the fractional value by 100 instead of multiplying the denominator of the division operation by 100.
This commit is contained in:
parent
b4311d79a9
commit
ddff071b8c
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ void UpdateInstaller::installFiles()
|
|||
++filesInstalled;
|
||||
if (m_observer)
|
||||
{
|
||||
double percentage = filesInstalled / (m_script->filesToInstall().size() * 100.0);
|
||||
double percentage = (1.0 * filesInstalled / m_script->filesToInstall().size()) * 100.0;
|
||||
m_observer->updateProgress(static_cast<int>(percentage));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue