mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 12:07:12 -06:00
9.13
This commit is contained in:
committed by
Kornel Lesiński
parent
76b173af78
commit
3dacb5eb8a
@@ -221,7 +221,7 @@ void COutArchive::WriteCentralHeader(const CItem &item)
|
||||
WriteBytes(item.Comment, (UInt32)item.Comment.GetCapacity());
|
||||
}
|
||||
|
||||
void COutArchive::WriteCentralDir(const CObjectVector<CItem> &items, const CByteBuffer &comment)
|
||||
void COutArchive::WriteCentralDir(const CObjectVector<CItem> &items, const CByteBuffer *comment)
|
||||
{
|
||||
SeekTo(m_BasePosition);
|
||||
|
||||
@@ -260,10 +260,10 @@ void COutArchive::WriteCentralDir(const CObjectVector<CItem> &items, const CByte
|
||||
WriteUInt16((UInt16)(items64 ? 0xFFFF: items.Size()));
|
||||
WriteUInt32(cdSize64 ? 0xFFFFFFFF: (UInt32)cdSize);
|
||||
WriteUInt32(cdOffset64 ? 0xFFFFFFFF: (UInt32)cdOffset);
|
||||
UInt16 commentSize = (UInt16)comment.GetCapacity();
|
||||
WriteUInt16(commentSize);
|
||||
UInt32 commentSize = (UInt32)(comment ? comment->GetCapacity() : 0);
|
||||
WriteUInt16((UInt16)commentSize);
|
||||
if (commentSize > 0)
|
||||
WriteBytes((const Byte *)comment, commentSize);
|
||||
WriteBytes((const Byte *)*comment, commentSize);
|
||||
m_OutBuffer.FlushWithCheck();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user