diff --git a/plugins/ui/include/ui/widgets.hpp b/plugins/ui/include/ui/widgets.hpp index 93f8ce1e7..2623724a1 100644 --- a/plugins/ui/include/ui/widgets.hpp +++ b/plugins/ui/include/ui/widgets.hpp @@ -43,6 +43,9 @@ namespace hex::ui { const auto width = ImGui::GetContentRegionAvail().x / 2 - ImGui::CalcTextSize(" - ").x / 2; u64 start = region->getStartAddress(), end = region->getEndAddress(); + if (end < start) + end = start; + ImGui::PushItemWidth(width); ImGuiExt::InputHexadecimal("##start", &start); ImGui::PopItemWidth();