mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
fix: Don't allow negative regions in region widgets
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user