diff --git a/script/api_protobuf/api_protobuf.py b/script/api_protobuf/api_protobuf.py index f423097b7f..0f3505f657 100755 --- a/script/api_protobuf/api_protobuf.py +++ b/script/api_protobuf/api_protobuf.py @@ -1478,7 +1478,7 @@ class RepeatedTypeInfo(TypeInfo): return None return ( f"case {self.number}: " - f"if (static_cast({content}) <= 31) " + f"if (static_cast({content}) < 32) " f"this->{self.field_name} |= (1U << static_cast({content})); " f"break;" )