Author: Maciej Fijalkowski <[email protected]>
Branch: virtual-arguments
Changeset: r56149:c315c21b31d8
Date: 2012-07-18 15:20 +0200
http://bitbucket.org/pypy/pypy/changeset/c315c21b31d8/
Log: and another one
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,8 +79,9 @@
if length <= 0:
return
- if self.pos + length > len(self.buf):
- self.buf.extend(['\0'] * (self.pos + length - len(self.buf)))
+ lgt = (self.pos + length - len(self.buf))
+ if lgt > 0:
+ self.buf.extend(['\0'] * lgt)
if self.pos > self.string_size:
# In case of overseek, pad with null bytes the buffer region
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit