From 67cb931bc742f63867d58adc8c68cad33ae3ce7c Mon Sep 17 00:00:00 2001 From: Aryan Date: Mon, 5 Feb 2024 22:23:36 +0530 Subject: [PATCH] Fix #12413 --- addons/misra.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/misra.py b/addons/misra.py index a48629b986f..41ecce180e0 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -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)