mirror of https://github.com/acidanthera/audk.git
BaseTools: Fix build crash when fdf is empty file
Fix build crash when fdf is empty file Fix https://bugzilla.tianocore.org/show_bug.cgi?id=912 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:
parent
1bf23e6b7f
commit
3b46dd93dd
|
@ -423,6 +423,8 @@ class FdfParser:
|
|||
|
||||
def __StringToList(self):
|
||||
self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesList]
|
||||
if not self.Profile.FileLinesList:
|
||||
EdkLogger.error('FdfParser', FILE_READ_FAILURE, 'The file is empty!', File=self.FileName)
|
||||
self.Profile.FileLinesList[-1].append(' ')
|
||||
|
||||
def __ReplaceFragment(self, StartPos, EndPos, Value = ' '):
|
||||
|
|
Loading…
Reference in New Issue