From b32055290a451893ba99dd00ef545df9547734e1 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 20 Jan 2024 10:32:31 +0100 Subject: [PATCH] fix: Assertion when there's too many hex editor rows on the screen --- plugins/ui/source/ui/hex_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ui/source/ui/hex_editor.cpp b/plugins/ui/source/ui/hex_editor.cpp index 1095ab452..91100b933 100644 --- a/plugins/ui/source/ui/hex_editor.cpp +++ b/plugins/ui/source/ui/hex_editor.cpp @@ -407,7 +407,7 @@ namespace hex::ui { m_visibleRowCount = ImGui::GetWindowSize().y / CharacterSize.y; - m_visibleRowCount = std::clamp(m_visibleRowCount, 1, numRows - m_scrollPosition); + m_visibleRowCount = std::clamp(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++) {