Restore a conditional I removed by mistake.

This commit is contained in:
Antoine Pitrou 2009-03-29 01:09:51 +00:00
parent 66994e1154
commit 9041daa9a7
1 changed files with 1 additions and 1 deletions

View File

@ -506,7 +506,7 @@ new_buffersize(PyFileIOObject *self, size_t currentsize)
actually be streaming pseudo-files. In this case, we
apply the more aggressive algorithm below.
*/
if (end >= SMALLCHUNK && pos >= 0) {
if (end >= SMALLCHUNK && end >= pos && pos >= 0) {
/* Add 1 so if the file were to grow we'd notice. */
return currentsize + end - pos + 1;
}