1
0
mirror of synced 2025-01-25 15:53:43 +01:00

fix: Don't allow negative regions in region widgets

This commit is contained in:
WerWolv 2024-12-23 01:00:41 +01:00
parent 8865db2007
commit a1d4545e29

View File

@ -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();