From a0f08cf3a2518e052e78d1a34fac1489e4ca2e1e Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Mon, 20 Nov 2017 16:52:51 -0800 Subject: [PATCH] segmath: fixup inverted logic for --exclude_known Skip tags and bits if they are _found_ in the excluded sets. Signed-off-by: Rick Altherr Signed-off-by: Tim 'mithro' Ansell --- tools/segmatch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/segmatch.cc b/tools/segmatch.cc index af379fda..d8815345 100644 --- a/tools/segmatch.cc +++ b/tools/segmatch.cc @@ -175,7 +175,7 @@ void read_input(std::istream &f, std::string filename) f >> token; - if (exclude_bits.find(token) == exclude_bits.end()) + if (exclude_bits.find(token) != exclude_bits.end()) continue; if (bit_ids.count(token) == 0) { @@ -196,7 +196,7 @@ void read_input(std::istream &f, std::string filename) f >> token; - if (exclude_tags.find(token) == exclude_tags.end()) { + if (exclude_tags.find(token) != exclude_tags.end()) { // Consume the rest of the line. f >> token; continue;