Skip to content

Commit

Permalink
[JsonGen] Don't verify bitmask value for enum -end- marker (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaszm authored Jan 22, 2025
1 parent 2ca04e1 commit 662c6a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion JsonGenerator/source/json_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,14 @@ def __DetermineSize(self):
is_bitmap = True
biggest = 0

try:
endmarker = self.cpp_enumerators.index(self.schema.get('@endmarker'))
except:
endmarker = None

for idx, e in enumerate(self.cpp_enumerator_values):
if isinstance(e, int):
if (e & (e-1) != 0) and (e != 0):
if (e & (e-1) != 0) and (e != 0) and endmarker != idx:
is_bitmap = False

if idx != e:
Expand Down

0 comments on commit 662c6a2

Please sign in to comment.