From fb7d40ddbefb1a30eadda6e8e1a80b31b4683121 Mon Sep 17 00:00:00 2001 From: Murmele Date: Sun, 9 Jun 2024 10:54:09 +0200 Subject: [PATCH] fix: Allow bookmark region to be set to 1 Byte length (#1747) ### Problem description When entering for the end value the same value as the start it is not recorgnized as valid region, because end must be strictly greater than begin. Due to the +1 in the Region constructor this is not correct, because the end is included in the range. ### Implementation description ### Screenshots After: ![image](https://github.com/WerWolv/ImHex/assets/10099533/c45d2001-8790-430a-8f1a-4b65130f4d01) ### Additional things --- plugins/builtin/source/content/views/view_bookmarks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/views/view_bookmarks.cpp b/plugins/builtin/source/content/views/view_bookmarks.cpp index b2359b91f..b9d81e1ed 100644 --- a/plugins/builtin/source/content/views/view_bookmarks.cpp +++ b/plugins/builtin/source/content/views/view_bookmarks.cpp @@ -440,7 +440,7 @@ namespace hex::plugin::builtin { ImGui::PopItemWidth(); - if (updated && end > begin) { + if (updated && end >= begin) { region = Region(begin, end - begin + 1); EventHighlightingChanged::post(); }