Fixed maximum block size for read().
This commit is contained in:
parent
2bca138ba8
commit
4df4ed54dd
@ -68,7 +68,7 @@ stream::size_type bufferedStreamCopyRange(inputStream& is, outputStream& os,
|
|||||||
while (!is.eof() && total < length)
|
while (!is.eof() && total < length)
|
||||||
{
|
{
|
||||||
const stream::size_type remaining = std::min(length - total, blockSize);
|
const stream::size_type remaining = std::min(length - total, blockSize);
|
||||||
const stream::size_type read = is.read(buffer, blockSize);
|
const stream::size_type read = is.read(buffer, remaining);
|
||||||
|
|
||||||
if (read != 0)
|
if (read != 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user