summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
index eb171887817..5ecb9be62ff 100644
--- a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
@@ -491,7 +491,7 @@ static void dumpSectionContrib(LinePrinter &P, const SectionContrib &SC,
ArrayRef<std::string> SectionNames,
uint32_t FieldWidth) {
std::string NameInsert;
- if (SC.ISect > 0 && SC.ISect < SectionNames.size()) {
+ if (SC.ISect > 0 && SC.ISect <= SectionNames.size()) {
StringRef SectionName = SectionNames[SC.ISect - 1];
NameInsert = formatv("[{0}]", SectionName).str();
} else
OpenPOWER on IntegriCloud