[pypy-commit] pypy virtual-arguments: backout c315c21b31d8

fijal noreply at buildbot.pypy.org
Fri Jul 20 10:48:03 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56258:85853f6825f3
Date: 2012-07-20 10:41 +0200
http://bitbucket.org/pypy/pypy/changeset/85853f6825f3/

Log:	backout c315c21b31d8

diff --git a/pypy/module/_io/interp_bytesio.py b/pypy/module/_io/interp_bytesio.py
--- a/pypy/module/_io/interp_bytesio.py
+++ b/pypy/module/_io/interp_bytesio.py
@@ -79,9 +79,8 @@
         if length <= 0:
             return
 
-        lgt = (self.pos + length - len(self.buf))
-        if lgt > 0:
-            self.buf.extend(['\0'] * lgt)
+        if self.pos + length > len(self.buf):
+            self.buf.extend(['\0'] * (self.pos + length - len(self.buf)))
 
         if self.pos > self.string_size:
             # In case of overseek, pad with null bytes the buffer region


More information about the pypy-commit mailing list