From a562518ad7af05a2ef16b1e5d470fcd6fbf0ff6a Mon Sep 17 00:00:00 2001 From: Samu698 Date: Sun, 13 Mar 2022 18:40:19 +0100 Subject: [PATCH] HexEditor: Fill selection sets only bytes inside selection Before this patch the fill selection command would set the selection and one byte after it --- Userland/Applications/HexEditor/HexEditor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index 409535ab9b..9281bbe830 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -93,9 +93,8 @@ void HexEditor::fill_selection(u8 fill_byte) if (!has_selection()) return; - for (size_t i = m_selection_start; i <= m_selection_end; i++) { + for (size_t i = m_selection_start; i < m_selection_end; i++) m_document->set(i, fill_byte); - } update(); did_change();