Fixed maximum block size for read().

This commit is contained in:
Vincent Richard 2013-03-06 22:48:08 +01:00
parent 2bca138ba8
commit 4df4ed54dd

View File

@ -68,7 +68,7 @@ stream::size_type bufferedStreamCopyRange(inputStream& is, outputStream& os,
while (!is.eof() && total < length)
{
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)
{