Skip to content

Commit

Permalink
HexEditor: Call size() instead of operator bool()
Browse files Browse the repository at this point in the history
This previously called operator bool by accident.
  • Loading branch information
gunnarbeutner authored and awesomekling committed May 16, 2021
1 parent 4b5dbc1 commit 24ca645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Applications/HexEditor/HexEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ int HexEditor::find_and_highlight(ByteBuffer& needle, int start)
int relative_offset = static_cast<const u8*>(raw_offset) - m_buffer.data();
dbgln("find_and_highlight: start={} raw_offset={} relative_offset={}", start, raw_offset, relative_offset);

auto end_of_match = relative_offset + needle;
auto end_of_match = relative_offset + needle.size();
set_position(relative_offset);
m_selection_start = relative_offset;
m_selection_end = end_of_match;
Expand Down

0 comments on commit 24ca645

Please sign in to comment.