From c65230d8585317f7cd58ae2982067385269fdee9 Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Tue, 2 Nov 2010 00:00:00 +0000 Subject: 9.18 --- CPP/7zip/Archive/Zip/ZipAddCommon.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'CPP/7zip/Archive/Zip') diff --git a/CPP/7zip/Archive/Zip/ZipAddCommon.cpp b/CPP/7zip/Archive/Zip/ZipAddCommon.cpp index ae75a1a2..4c5fd38d 100755 --- a/CPP/7zip/Archive/Zip/ZipAddCommon.cpp +++ b/CPP/7zip/Archive/Zip/ZipAddCommon.cpp @@ -53,18 +53,17 @@ HRESULT CLzmaEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIAN EncoderSpec = new NCompress::NLzma::CEncoder; Encoder = EncoderSpec; } - CSequentialOutStreamImp *outStreamSpec = new CSequentialOutStreamImp; + CBufPtrSeqOutStream *outStreamSpec = new CBufPtrSeqOutStream; CMyComPtr outStream(outStreamSpec); - outStreamSpec->Init(); + outStreamSpec->Init(Header + 4, kLzmaPropsSize); RINOK(EncoderSpec->SetCoderProperties(propIDs, props, numProps)); RINOK(EncoderSpec->WriteCoderProperties(outStream)); - if (outStreamSpec->GetSize() != kLzmaPropsSize) + if (outStreamSpec->GetPos() != kLzmaPropsSize) return E_FAIL; Header[0] = MY_VER_MAJOR; Header[1] = MY_VER_MINOR; Header[2] = kLzmaPropsSize; Header[3] = 0; - memcpy(Header + 4, outStreamSpec->GetBuffer(), kLzmaPropsSize); return S_OK; } -- cgit v1.2.3