Fixed FLAG_IS_SET to check if all bits in the flag are set in the value (#5441)

This commit is contained in:
Dan Vu
2025-12-24 20:58:40 +01:00
committed by GitHub
parent 20dd4641c8
commit 101502103a

View File

@ -273,7 +273,7 @@
#define FLAG_SET(n, f) ((n) |= (f))
#define FLAG_CLEAR(n, f) ((n) &= ~(f))
#define FLAG_TOGGLE(n, f) ((n) ^= (f))
#define FLAG_IS_SET(n, f) (((n) & (f)) > 0)
#define FLAG_IS_SET(n, f) (((n) & (f)) == (f))
//----------------------------------------------------------------------------------
// Types and Structures Definition