From fd171542e0aa89ac12a09d79608173f48019b14b Mon Sep 17 00:00:00 2001 From: vanjeff Date: Fri, 11 Sep 2009 03:14:43 +0000 Subject: Sync basetools' source and binary files with r1707 of the basetools project. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp') diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp index 654daed549..298eb0289b 100644 --- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp @@ -787,11 +787,22 @@ CIfrRecordInfoDB::IfrRecordInfoUpdate ( ) { SIfrRecord *pNode; + SIfrRecord *Prev; if ((pNode = GetRecordInfoFromIdx (RecordIdx)) == NULL) { return; } + if (LineNo == 0) { + // + // Line number is not specified explicitly, try to use line number of previous opcode + // + Prev = GetRecordInfoFromIdx (RecordIdx - 1); + if (Prev != NULL) { + LineNo = Prev->mLineNo; + } + } + pNode->mLineNo = LineNo; pNode->mOffset = Offset; pNode->mBinBufLen = BinBufLen; -- cgit v1.2.3