mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 18:06:55 -06:00
4.59 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
3901bf0ab8
commit
173c07e166
@@ -22,3 +22,24 @@ STDMETHODIMP CLimitedSequentialInStream::Read(void *data, UInt32 size, UInt32 *p
|
||||
return result;
|
||||
}
|
||||
|
||||
STDMETHODIMP CLimitedSequentialOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
HRESULT result = S_OK;
|
||||
if (processedSize != NULL)
|
||||
*processedSize = 0;
|
||||
if (size > _size)
|
||||
{
|
||||
size = (UInt32)_size;
|
||||
if (size == 0)
|
||||
{
|
||||
_overflow = true;
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
if (_stream)
|
||||
result = _stream->Write(data, size, &size);
|
||||
_size -= size;
|
||||
if (processedSize != NULL)
|
||||
*processedSize = size;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user