summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index d07aa69..51752abc 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -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;
}