[mach-o] keep Windows library happy.

&v[v.size()] may be invalid C++.

llvm-svn: 220115
This commit is contained in:
Tim Northover 2014-10-18 00:36:03 +00:00
parent 0f5735965d
commit 24b7dd431e
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ public:
_contents.resize(_commonEncodingsOffset + _contents.resize(_commonEncodingsOffset +
commonEncodings.size() * sizeof(uint32_t)); commonEncodings.size() * sizeof(uint32_t));
int32_t *commonEncodingsArea = int32_t *commonEncodingsArea =
(int32_t *)&_contents[_commonEncodingsOffset]; reinterpret_cast<int32_t *>(_contents.data() + _commonEncodingsOffset);
for (uint32_t encoding : commonEncodings) for (uint32_t encoding : commonEncodings)
write32(*commonEncodingsArea++, _swap, encoding); write32(*commonEncodingsArea++, _swap, encoding);