Skip to content

Commit

Permalink
Fix #12413
Browse files Browse the repository at this point in the history
  • Loading branch information
0x41head committed Feb 5, 2024
1 parent faaabb1 commit 67cb931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/misra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ def get_category(essential_type):
rhs_category = get_category(rhs)
if lhs_category and rhs_category and lhs_category != rhs_category and rhs_category not in ('signed','unsigned'):
self.reportError(tok, 10, 3)
if bitsOfEssentialType(lhs) < bitsOfEssentialType(rhs):
if bitsOfEssentialType(lhs) < bitsOfEssentialType(rhs) and (lhs != "bool" or tok.astOperand2.str not in ('0','1')):
self.reportError(tok, 10, 3)


Expand Down

0 comments on commit 67cb931

Please sign in to comment.