mirror of
https://github.com/Atmosphere-NX/hac2l.git
synced 2025-06-29 06:22:39 +02:00
hac2l: cap percentage calculation when progress-printing (closes #2)
This commit is contained in:
parent
3048cde118
commit
7fc1b3a32c
@ -44,7 +44,7 @@ namespace ams::hactool {
|
|||||||
m_current = new_current;
|
m_current = new_current;
|
||||||
|
|
||||||
const size_t unit = m_total / Count;
|
const size_t unit = m_total / Count;
|
||||||
if (const size_t segs = m_current / unit; segs != m_segs) {
|
if (const size_t segs = std::min<size_t>(m_current / unit, Count); segs != m_segs) {
|
||||||
m_segs = segs;
|
m_segs = segs;
|
||||||
this->Render();
|
this->Render();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user