mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 06:11:36 -06:00
4.27 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
31e7b924e8
commit
d66cf2fcf3
@@ -11,8 +11,7 @@ void CLimitedSequentialInStream::Init(ISequentialInStream *stream, UInt64 stream
|
||||
_size = streamSize;
|
||||
}
|
||||
|
||||
STDMETHODIMP CLimitedSequentialInStream::Read(void *data,
|
||||
UInt32 size, UInt32 *processedSize)
|
||||
STDMETHODIMP CLimitedSequentialInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
UInt32 processedSizeReal;
|
||||
UInt32 sizeToRead = UInt32(MyMin(_size, UInt64(size)));
|
||||
@@ -22,15 +21,4 @@ STDMETHODIMP CLimitedSequentialInStream::Read(void *data,
|
||||
*processedSize = processedSizeReal;
|
||||
return result;
|
||||
}
|
||||
|
||||
STDMETHODIMP CLimitedSequentialInStream::ReadPart(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
UInt32 processedSizeReal;
|
||||
UInt32 sizeToRead = UInt32(MyMin(_size, UInt64(size)));
|
||||
HRESULT result = _stream->ReadPart(data, sizeToRead, &processedSizeReal);
|
||||
_size -= processedSizeReal;
|
||||
if(processedSize != NULL)
|
||||
*processedSize = processedSizeReal;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user