From 24ca645f08857612f77370c0bca14493f1de0cd8 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 16 May 2021 08:44:05 +0200 Subject: [PATCH] HexEditor: Call size() instead of operator bool() This previously called operator bool by accident. --- Userland/Applications/HexEditor/HexEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index bbd8c9bce4..31177674e3 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -575,7 +575,7 @@ int HexEditor::find_and_highlight(ByteBuffer& needle, int start) int relative_offset = static_cast(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;