diff options
author | Samu698 <samu2altervista@gmail.com> | 2022-03-13 18:40:19 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-14 22:48:16 +0100 |
commit | a562518ad7af05a2ef16b1e5d470fcd6fbf0ff6a (patch) | |
tree | 0177b5c70ab811346e4c7caadf642010078d1639 /Userland/Applications/HexEditor/HexEditor.cpp | |
parent | 7bf4ed98d70f01207d56f167c6b6cfb16c615e18 (diff) | |
download | serenity-a562518ad7af05a2ef16b1e5d470fcd6fbf0ff6a.zip |
HexEditor: Fill selection sets only bytes inside selection
Before this patch the fill selection command would set the selection
and one byte after it
Diffstat (limited to 'Userland/Applications/HexEditor/HexEditor.cpp')
-rw-r--r-- | Userland/Applications/HexEditor/HexEditor.cpp | 3 |
1 files changed, 1 insertions, 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(); |