[edk2-devel] [PATCH 1/1] BaseTools: Fixed Index out of range.

Mingyue Liang mingyuex.liang at intel.com
Fri Nov 13 06:17:09 UTC 2020


information generated by patch of push bz2972.

When we update trim.deps This problem occurs when the
content is only one line.

Therefore, if the content is more than one line, it
will be retrieved.

Signed-off-by: Mingyue Liang <mingyuex.liang at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen at intel.com>
---
 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
index b06ef42573fd..5ec26eb98b42 100644
--- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
@@ -291,7 +291,8 @@ ${END}
                 targetitem = self.GetRealTarget(source_abs.strip(" :"))
 
                 targetitem += ": "
-                targetitem += lines[1]
+                if len(lines)>=2:
+                    targetitem += lines[1]
                 newcontent.append(targetitem)
                 newcontent.extend(lines[2:])
                 newcontent.append("\n")
-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67513): https://edk2.groups.io/g/devel/message/67513
Mute This Topic: https://groups.io/mt/78224683/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list