Subtle fix in the read() code which could cause a read broken up in

several pieces to fail...
This commit is contained in:
Guido van Rossum 1998-03-18 17:59:20 +00:00
parent 3f0666c4a2
commit 240c35aac0
1 changed files with 1 additions and 1 deletions

View File

@ -469,7 +469,7 @@ file_read(f, args)
if (bytesread < buffersize)
break;
if (bytesrequested < 0) {
buffersize = new_buffersize(f, buffersize);
buffersize = bytesread + new_buffersize(f, buffersize);
if (_PyString_Resize(&v, buffersize) < 0)
return NULL;
}