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>
(cherry picked from commit b31501c90a
)
This commit is contained in:
committed by
Yonghong Zhu
parent
be80d16679
commit
3986490ce0
@ -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