aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/WindowsResource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/WindowsResource.cpp')
-rw-r--r--lib/Object/WindowsResource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Object/WindowsResource.cpp b/lib/Object/WindowsResource.cpp
index 1371eacdf8f2..246eee5ddb31 100644
--- a/lib/Object/WindowsResource.cpp
+++ b/lib/Object/WindowsResource.cpp
@@ -609,8 +609,8 @@ void WindowsResourceCOFFWriter::writeDirectoryTree() {
for (auto const &Child : StringChildren) {
auto *Entry = reinterpret_cast<coff_resource_dir_entry *>(BufferStart +
CurrentOffset);
- Entry->Identifier.NameOffset =
- StringTableOffsets[Child.second->getStringIndex()];
+ Entry->Identifier.setNameOffset(
+ StringTableOffsets[Child.second->getStringIndex()]);
if (Child.second->checkIsDataNode()) {
Entry->Offset.DataEntryOffset = NextLevelOffset;
NextLevelOffset += sizeof(coff_resource_data_entry);