BaseTools:Expression.py Add Assertion for PCD with value {}

This adds an assertion to the PCD class in the Expression.py
file to check for zero-byte PCDs.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
This commit is contained in:
Doug Flick
2025-04-11 16:06:09 -07:00
committed by mergify[bot]
parent a1b623b938
commit 1805068b5e

View File

@@ -1027,6 +1027,8 @@ class ValueExpressionEx(ValueExpression):
if Size > 0:
PcdValue = '{' + ', '.join(AllPcdValueList) + '}'
else:
raise BadExpression("PCD with value '%s' cannot be used. Please provide a valid value of at least one byte." % (self.PcdValue))
else:
raise BadExpression("Type: %s, Value: %s, %s"%(self.PcdType, PcdValue, Value))