summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOUniversal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/MachOUniversal.cpp')
-rw-r--r--llvm/lib/Object/MachOUniversal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOUniversal.cpp b/llvm/lib/Object/MachOUniversal.cpp
index e414de8bcf1..05729ef7467 100644
--- a/llvm/lib/Object/MachOUniversal.cpp
+++ b/llvm/lib/Object/MachOUniversal.cpp
@@ -53,7 +53,7 @@ static T getUniversalBinaryStruct(const char *Ptr) {
MachOUniversalBinary::ObjectForArch::ObjectForArch(
const MachOUniversalBinary *Parent, uint32_t Index)
: Parent(Parent), Index(Index) {
- if (!Parent || Index > Parent->getNumberOfObjects()) {
+ if (!Parent || Index >= Parent->getNumberOfObjects()) {
clear();
} else {
// Parse object header.
OpenPOWER on IntegriCloud