commit | 9041daa9a757a7bf0c5924d2cad39cc497b13274 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 29 01:09:51 2009 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 29 01:09:51 2009 +0000 |
tree | a55b4dbb45bbfc562c9182f052d9a9f6c41f8702 | |
parent | 66994e11544ac8b173ccfedbd05c47082f1dc842 [diff] [blame] |
Restore a conditional I removed by mistake.
diff --git a/Modules/_fileio.c b/Modules/_fileio.c index 6093b40..c6b97fb 100644 --- a/Modules/_fileio.c +++ b/Modules/_fileio.c
@@ -506,7 +506,7 @@ 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; }