]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
Sync tool code to BuildTools project r1739.
[mirror_edk2.git] / BaseTools / Source / C / VfrCompile / VfrFormPkg.cpp
index 654daed5490ca422147c191cfe7870b8abed2e47..87da95af715c76f7eab6c218f1947a34c4b547a4 100644 (file)
@@ -2,7 +2,7 @@
   \r
   The definition of CFormPkg's member function\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2009, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -787,11 +787,22 @@ CIfrRecordInfoDB::IfrRecordInfoUpdate (
   )\r
 {\r
   SIfrRecord *pNode;\r
+  SIfrRecord *Prev;\r
 \r
   if ((pNode = GetRecordInfoFromIdx (RecordIdx)) == NULL) {\r
     return;\r
   }\r
 \r
+  if (LineNo == 0) {\r
+    //\r
+    // Line number is not specified explicitly, try to use line number of previous opcode\r
+    //\r
+    Prev = GetRecordInfoFromIdx (RecordIdx - 1);\r
+    if (Prev != NULL) {\r
+      LineNo = Prev->mLineNo;\r
+    }\r
+  }\r
+\r
   pNode->mLineNo    = LineNo;\r
   pNode->mOffset    = Offset;\r
   pNode->mBinBufLen = BinBufLen;\r
@@ -1217,7 +1228,7 @@ static struct {
   { sizeof (EFI_IFR_INCONSISTENT_IF), 1 },     // EFI_IFR_INCONSISTENT_IF_OP\r
   { sizeof (EFI_IFR_EQ_ID_VAL), 0 },           // EFI_IFR_EQ_ID_VAL_OP\r
   { sizeof (EFI_IFR_EQ_ID_ID), 0 },            // EFI_IFR_EQ_ID_ID_OP\r
-  { sizeof (EFI_IFR_EQ_ID_LIST), 0 },          // EFI_IFR_EQ_ID_LIST_OP - 0x14\r
+  { sizeof (EFI_IFR_EQ_ID_VAL_LIST), 0 },      // EFI_IFR_EQ_ID_LIST_OP - 0x14\r
   { sizeof (EFI_IFR_AND), 0 },                 // EFI_IFR_AND_OP\r
   { sizeof (EFI_IFR_OR), 0 },                  // EFI_IFR_OR_OP\r
   { sizeof (EFI_IFR_NOT), 0 },                 // EFI_IFR_NOT_OP\r