summaryrefslogtreecommitdiff
path: root/tools/macho-dump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/macho-dump')
-rw-r--r--tools/macho-dump/macho-dump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp
index 88fd4529ab..897a785f41 100644
--- a/tools/macho-dump/macho-dump.cpp
+++ b/tools/macho-dump/macho-dump.cpp
@@ -292,7 +292,7 @@ DumpDataInCodeDataCommand(const MachOObjectFile &Obj,
<< " ('datasize', " << LLC.DataSize << ")\n"
<< " ('_data_regions', [\n";
- unsigned NumRegions = LLC.DataSize / 8;
+ unsigned NumRegions = LLC.DataSize / sizeof(macho::DataInCodeTableEntry);
for (unsigned i = 0; i < NumRegions; ++i) {
macho::DataInCodeTableEntry DICE =
Obj.getDataInCodeTableEntry(LLC.DataOffset, i);