fix: Don't allow negative regions in region widgets
This commit is contained in:
parent
8865db2007
commit
a1d4545e29
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user