aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2024-01-27 16:42:17 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2024-01-27 16:42:17 +0000
commit7b58f822289228e0706b24fc93cb801ca27ecf42 (patch)
tree45374118ce3b7b84c28966b64d6d079eba265e45 /tools
parentf3216e8c4a82deb887b9d56b7aaf2f49d7abb5d2 (diff)
Set BASE_NONE for FT_BOOLEAN items with zero mask
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check_typed_item_calls.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/check_typed_item_calls.py b/tools/check_typed_item_calls.py
index eeee75d8e9..d7683cc19d 100755
--- a/tools/check_typed_item_calls.py
+++ b/tools/check_typed_item_calls.py
@@ -1258,8 +1258,8 @@ class Item:
def check_boolean_length(self):
global errors_found
- # If mask is 0, display must be BASE_NONE. TODO: modify test to use self.display != 'BASE_NONE' !
- if self.item_type == 'FT_BOOLEAN' and self.mask_read and self.mask_value == 0 and self.display_value != 0:
+ # If mask is 0, display must be BASE_NONE.
+ if self.item_type == 'FT_BOOLEAN' and self.mask_read and self.mask_value == 0 and self.display != 'BASE_NONE':
print('Error:', self.filename, self.hf, 'type is FT_BOOLEAN, no mask set (', self.mask, ') - display should be BASE_NONE, is instead', self.display)
errors_found += 1
# TODO: check for length > 64?
@@ -1442,7 +1442,7 @@ def isGeneratedFile(filename):
def find_macros(filename):
# Pre-populate with some useful values..
- macros = { 'BASE_NONE' : 0 }
+ macros = { 'BASE_NONE' : 0, 'BASE_DEC' : 1 }
with open(filename, 'r', encoding="utf8") as f:
contents = f.read()