BaseTools: Fix parse OFFSET_OF get wrong offset

Fix parse OFFSET_OF get wrong offset

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Feng, YunhuaX 2018-03-09 16:46:00 +08:00 committed by Yonghong Zhu
parent 705ed563de
commit b31501c90a
1 changed files with 2 additions and 1 deletions

View File

@ -909,8 +909,9 @@ class ValueExpressionEx(ValueExpression):
LabelOffset = 0
for Index, Item in enumerate(PcdValueList):
# compute byte offset of every LABEL
Item = Item.strip()
LabelList = ReLabel.findall(Item)
Item = ReLabel.sub('', Item)
Item = Item.strip()
if LabelList:
for Label in LabelList:
if not IsValidCString(Label):