]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix flags bitops
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 1 May 2022 11:42:10 +0000 (12:42 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 1 May 2022 11:42:10 +0000 (12:42 +0100)
src/libserver/symcache/symcache_item.cxx

index 635dc6324299cd124241ed16467e251c5aa5842f..dbcd66690b70f163ccad4b2f7e235776526df9b6 100644 (file)
@@ -357,7 +357,7 @@ auto item_type_from_c(enum rspamd_symbol_type type) -> tl::expected<std::pair<sy
                                                                                 | SYMBOL_TYPE_VIRTUAL;
 
        constexpr auto all_but_one_ty = [&](int type, int exclude_bit) -> auto {
-               return type & (trivial_types & ~exclude_bit);
+               return (type & trivial_types) & (trivial_types & ~exclude_bit);
        };
 
        if (type & trivial_types) {