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

fix: Page count displaying wrongly in empty files

This commit is contained in:
WerWolv 2023-06-26 11:13:12 +02:00
parent e03c91b888
commit cda883bb0f

View File

@ -639,7 +639,7 @@ namespace hex::plugin::builtin::ui {
void HexEditor::drawFooter(const ImVec2 &size) {
if (this->m_provider != nullptr && this->m_provider->isReadable()) {
const auto pageCount = this->m_provider->getPageCount();
const auto pageCount = std::max<u32>(1, this->m_provider->getPageCount());
constexpr static u32 MinPage = 1;
const auto windowEndPos = ImGui::GetWindowPos() + size - ImGui::GetStyle().WindowPadding;