diff --git a/plugins/builtin/include/content/helpers/provider_extra_data.hpp b/plugins/builtin/include/content/helpers/provider_extra_data.hpp index 46fb1b9e3..5fb3f3691 100644 --- a/plugins/builtin/include/content/helpers/provider_extra_data.hpp +++ b/plugins/builtin/include/content/helpers/provider_extra_data.hpp @@ -88,8 +88,8 @@ namespace hex::plugin::builtin { size_t size; bool wholeDataMatch; - u32 highlightId; - u32 tooltipId; + mutable u32 highlightId; + mutable u32 tooltipId; }; std::vector> rules; diff --git a/plugins/builtin/source/content/views/view_yara.cpp b/plugins/builtin/source/content/views/view_yara.cpp index 645481f7d..e799d1f6a 100644 --- a/plugins/builtin/source/content/views/view_yara.cpp +++ b/plugins/builtin/source/content/views/view_yara.cpp @@ -423,7 +423,7 @@ namespace hex::plugin::builtin { std::move(uniques.begin(), uniques.end(), std::back_inserter(matches)); constexpr static color_t YaraColor = 0x70B4771F; - for (auto &match : matches) { + for (auto &match : uniques) { match.highlightId = ImHexApi::HexEditor::addBackgroundHighlight({ match.address, match.size }, YaraColor); match.tooltipId = ImHexApi::HexEditor::addTooltip({ match. address, match.size }, hex::format("{0} [{1}]", match.identifier, match.variable), YaraColor); }