This commit is contained in:
Igor Pavlov
2010-04-15 00:00:00 +00:00
committed by Kornel Lesiński
parent 76b173af78
commit 3dacb5eb8a
67 changed files with 906 additions and 758 deletions

View File

@@ -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();
}