X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FCommon%2FExpression.py;h=30711cedd784f83922430c39b95a7343f09a0473;hp=683604cab5d3a9a83089522e2f9d23d0d4156a9f;hb=663b9e061ed1b48e562159e51333e996f1efc830;hpb=56326323e6579d4cde9802c684baba06acbdb1d2;ds=sidebyside diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 683604cab5..30711cedd7 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -991,7 +991,7 @@ class ValueExpressionEx(ValueExpression): Item = '0x%x' % TmpValue if type(TmpValue) != type('') else TmpValue if ItemSize == 0: ItemValue, ItemSize = ParseFieldValue(Item) - if not (Item.startswith('"') or Item.startswith('L') or Item.startswith('{')) and ItemSize > 1: + if Item[0] not in ['"','L','{'] and ItemSize > 1: raise BadExpression("Byte array number %s should less than 0xFF." % Item) else: ItemValue = ParseFieldValue(Item)[0]