1
0
mirror of synced 2025-01-18 17:14:13 +01:00

fix: Assertion when there's too many hex editor rows on the screen

This commit is contained in:
WerWolv 2024-01-20 10:32:31 +01:00
parent cc97c0e525
commit b32055290a

View File

@ -407,7 +407,7 @@ namespace hex::ui {
m_visibleRowCount = ImGui::GetWindowSize().y / CharacterSize.y;
m_visibleRowCount = std::clamp<u32>(m_visibleRowCount, 1, numRows - m_scrollPosition);
m_visibleRowCount = std::clamp<i64>(m_visibleRowCount, 1, numRows - m_scrollPosition);
// Loop over rows
for (ImS64 y = m_scrollPosition; y < (m_scrollPosition + m_visibleRowCount + 5) && y < numRows && numRows != 0; y++) {