mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
Correct the computation of when to add the padding. It is not based on the
member's size. It is based on the oddness/evenness of the file pointer. This fixes a bug with llvm-ar not being able to read archives produced by llvm-ranlib when there are members with odd long file name lengths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -290,7 +290,7 @@ Archive::writeMember(
|
||||
ARFile.write(data,fSize);
|
||||
|
||||
// Make sure the member is an even length
|
||||
if (ARFile.tellp() % 2 != 0)
|
||||
if (ARFile.tellp() & 1 == 1)
|
||||
ARFile << ARFILE_PAD;
|
||||
|
||||
// Free the compressed data, if necessary
|
||||
|
||||
Reference in New Issue
Block a user