hac2l: cap percentage calculation when progress-printing (closes #2)

This commit is contained in:
Michael Scire 2023-03-07 05:42:44 -07:00
parent 3048cde118
commit 7fc1b3a32c

View File

@ -44,7 +44,7 @@ namespace ams::hactool {
m_current = new_current;
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;
this->Render();
}