From 0f1c0d2d2d9e567746ce4fedea23f833fa0d3abd Mon Sep 17 00:00:00 2001 From: Doug Flick Date: Mon, 14 Apr 2025 09:55:49 -0700 Subject: BaseTools:Expression.py Adding a check for missing '}' in the parser This check is to catch cases where a missing '}' exists in a dec or dsc file. Signed-off-by: Doug Flick --- BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Common/Expression.py') diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 138b38c927..f8b34aaa58 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -917,7 +917,7 @@ class ValueExpressionEx(ValueExpression): TmpList.append('0x%02x' % ((TmpValue >> I * 8) & 0xff)) PcdValue = '{' + ', '.join(TmpList) + '}' except: - if PcdValue.strip().startswith('{'): + if PcdValue.strip().startswith('{') and PcdValue.strip().endswith('}'): PcdValueList = SplitPcdValueString(PcdValue.strip()[1:-1]) LabelDict = {} NewPcdValueList = [] -- cgit v1.2.3