From 184d468b0697bbc83b1708fd1147e2d156b01fb9 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Wed, 18 Oct 2023 17:35:27 -0700 Subject: [PATCH] Dictionary conditions reversed. During a code cleanup, a check for a TLV tag inverted the logic. --- Dictionary.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dictionary.cc b/Dictionary.cc index 0bdc8c2..a55410b 100644 --- a/Dictionary.cc +++ b/Dictionary.cc @@ -44,8 +44,8 @@ Dictionary::Lookup(const char *key, uint8_t klen, TLV::Record &res) if ((klen == res.Len) && (memcmp(res.Val, key, klen) == 0)) { TLV::ReadFromMemory(res, cursor); - assert(res.Tag != this->vTag); - return res.Tag != this->vTag; + assert(res.Tag == this->vTag); + return res.Tag == this->vTag; } cursor = TLV::FindTag(this->arena, cursor, res); }