From 4271b2e9fd4ec6f72d727300d33a6d8376b0b1c8 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 14 Mar 2023 17:02:59 +0100 Subject: [PATCH] fix: Yara view filtering out all but one match --- plugins/builtin/source/content/views/view_yara.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/builtin/source/content/views/view_yara.cpp b/plugins/builtin/source/content/views/view_yara.cpp index e3d08c1b6..5cffd2c37 100644 --- a/plugins/builtin/source/content/views/view_yara.cpp +++ b/plugins/builtin/source/content/views/view_yara.cpp @@ -415,11 +415,8 @@ namespace hex::plugin::builtin { std::move(resultContext.newMatches.begin(), resultContext.newMatches.end(), std::back_inserter(matches)); auto uniques = std::set(matches.begin(), matches.end(), [](const auto &l, const auto &r) { - return l.address < r.address && - l.size < r.size && - l.wholeDataMatch < r.wholeDataMatch && - l.identifier < r.identifier && - l.variable < r.variable; + return std::tie(l.address, l.size, l.wholeDataMatch, l.identifier, l.variable) < + std::tie(r.address, r.size, r.wholeDataMatch, r.identifier, r.variable); }); matches.clear(); std::move(uniques.begin(), uniques.end(), std::back_inserter(matches));