fix: Duplicate highlightings for every yara rule
This commit is contained in:
parent
b1aa58d446
commit
197e86f327
@ -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<std::pair<std::fs::path, std::fs::path>> rules;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user