mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
HexEditor: Don't update selection numbers when clicking the last+1 char
Clicking at the cell after the last one, where there's no character, used to update the selection from/to numbers. Since there's no character there, that shouldn't happen.
This commit is contained in:
parent
5e66eda688
commit
b2a6d2cea4
1 changed files with 2 additions and 2 deletions
|
@ -217,7 +217,7 @@ void HexEditor::mousedown_event(GUI::MouseEvent& event)
|
|||
auto byte_y = (absolute_y - hex_start_y) / line_height();
|
||||
auto offset = (byte_y * m_bytes_per_row) + byte_x;
|
||||
|
||||
if (offset < 0 || offset > static_cast<int>(m_buffer.size()))
|
||||
if (offset < 0 || offset >= static_cast<int>(m_buffer.size()))
|
||||
return;
|
||||
|
||||
#ifdef HEX_DEBUG
|
||||
|
@ -239,7 +239,7 @@ void HexEditor::mousedown_event(GUI::MouseEvent& event)
|
|||
auto byte_y = (absolute_y - text_start_y) / line_height();
|
||||
auto offset = (byte_y * m_bytes_per_row) + byte_x;
|
||||
|
||||
if (offset < 0 || offset > static_cast<int>(m_buffer.size()))
|
||||
if (offset < 0 || offset >= static_cast<int>(m_buffer.size()))
|
||||
return;
|
||||
|
||||
#ifdef HEX_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue