BaseTools: fix a bug for uni file \x####\ format handling

It should start from the last '\x' position + 1 to find next '\x'
character.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2016-05-10 17:46:23 +08:00
parent 070827be5a
commit ad319b9307
1 changed files with 1 additions and 1 deletions

View File

@ -444,7 +444,7 @@ class UniFileClassObject(object):
Line = Line[0 : StartPos] + UniStr + EndStr Line = Line[0 : StartPos] + UniStr + EndStr
else: else:
Line = Line[0 : StartPos] + UniStr + EndStr[1:] Line = Line[0 : StartPos] + UniStr + EndStr[1:]
StartPos = Line.find(u'\\x', StartPos) StartPos = Line.find(u'\\x', StartPos + 1)
IncList = gIncludePattern.findall(Line) IncList = gIncludePattern.findall(Line)
if len(IncList) == 1: if len(IncList) == 1: