summaryrefslogtreecommitdiff
path: root/lib/Object/MachOUniversal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/MachOUniversal.cpp')
-rw-r--r--lib/Object/MachOUniversal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Object/MachOUniversal.cpp b/lib/Object/MachOUniversal.cpp
index e414de8bcf..05729ef746 100644
--- a/lib/Object/MachOUniversal.cpp
+++ b/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.