BaseTools: FMMT replace output file is not generated successfully
For replace function, when target Ffs and new ffs are with same size, the output file can not be generated successfully. This patch fixes this issue. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
@ -56,7 +56,7 @@ class BIOSTREE:
|
||||
if len(self.Child) == 0:
|
||||
self.Child.append(newNode)
|
||||
else:
|
||||
if not pos:
|
||||
if not pos or pos == len(self.Child):
|
||||
LastTree = self.Child[-1]
|
||||
self.Child.append(newNode)
|
||||
LastTree.NextRel = newNode
|
||||
@ -195,4 +195,4 @@ class BIOSTREE:
|
||||
for item in self.Child:
|
||||
TreeInfo[key].setdefault('Files',[]).append( item.ExportTree())
|
||||
|
||||
return TreeInfo
|
||||
return TreeInfo
|
||||
|
Reference in New Issue
Block a user