Skip to content

Commit

Permalink
DFReader: In dump verbose show hex value for bitmask fields
Browse files Browse the repository at this point in the history
  • Loading branch information
shancock884 committed Jul 8, 2024
1 parent bd6fa57 commit 2af9298
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ def dump_verbose(self, f):
except UnicodeDecodeError:
f.write(" %s: %s" % (c, to_string(val)))

# If this is a bitmask, then append the hex value
if c in field_metadata_by_name:
if hasattr(field_metadata_by_name[c],'bitmask'):
f.write(" (0x%x)" % val)

# see if this is an enumeration entry, emit enumeration
# entry name if it is
if c in field_metadata_by_name:
Expand Down

0 comments on commit 2af9298

Please sign in to comment.