Kaydet (Commit) 9534a8fe authored tarafından David Tardon's avatar David Tardon

set number of read bytes correctly

It was wrong if we read less than was expected.

Thanks to Antti Levomäki and Christian Jalio from Forcepoint.

Change-Id: I070c1731d1aace4c101fa01efed0c28734c44899
üst 0808618e
......@@ -877,7 +877,10 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
if (!mpImpl->mnReadBufferLength)
return nullptr;
numBytesRead = numBytes;
if (numBytes <= mpImpl->mnReadBufferLength)
numBytesRead = numBytes;
else
numBytesRead = mpImpl->mnReadBufferLength;
mpImpl->mnReadBufferPos += numBytesRead;
return mpImpl->mpReadBuffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment