diff options
-rw-r--r-- | librpc/ndr/ndr_basic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index ae5af7a4a5..a6cf607f3e 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -1017,13 +1017,13 @@ _PUBLIC_ void ndr_print_enum(struct ndr_print *ndr, const char *name, const char _PUBLIC_ void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value) { - /* this is an attempt to support multi-bit bitmap masks */ - value &= flag; - - if (value == 0) { + if (flag == 0) { return; } + /* this is an attempt to support multi-bit bitmap masks */ + value &= flag; + while (!(flag & 1)) { flag >>= 1; value >>= 1; |