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:
committed by
Yonghong Zhu
parent
705ed563de
commit
b31501c90a
@ -909,8 +909,9 @@ class ValueExpressionEx(ValueExpression):
|
|||||||
LabelOffset = 0
|
LabelOffset = 0
|
||||||
for Index, Item in enumerate(PcdValueList):
|
for Index, Item in enumerate(PcdValueList):
|
||||||
# compute byte offset of every LABEL
|
# compute byte offset of every LABEL
|
||||||
Item = Item.strip()
|
|
||||||
LabelList = ReLabel.findall(Item)
|
LabelList = ReLabel.findall(Item)
|
||||||
|
Item = ReLabel.sub('', Item)
|
||||||
|
Item = Item.strip()
|
||||||
if LabelList:
|
if LabelList:
|
||||||
for Label in LabelList:
|
for Label in LabelList:
|
||||||
if not IsValidCString(Label):
|
if not IsValidCString(Label):
|
||||||
|
Reference in New Issue
Block a user