Subtle fix in the read() code which could cause a read broken up in
several pieces to fail...
This commit is contained in:
parent
3f0666c4a2
commit
240c35aac0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue