Author: Maciej Fijalkowski <[email protected]>
Branch: virtual-arguments
Changeset: r56165:7bbdd564ee01
Date: 2012-07-18 16:25 +0200
http://bitbucket.org/pypy/pypy/changeset/7bbdd564ee01/

Log:    another one

diff --git a/pypy/module/_io/interp_stringio.py 
b/pypy/module/_io/interp_stringio.py
--- a/pypy/module/_io/interp_stringio.py
+++ b/pypy/module/_io/interp_stringio.py
@@ -113,8 +113,9 @@
     def resize_buffer(self, newlength):
         if len(self.buf) > newlength:
             self.buf = self.buf[:newlength]
-        if len(self.buf) < newlength:
-            self.buf.extend([u'\0'] * (newlength - len(self.buf)))
+        lgt = newlength - len(self.buf)
+        if lgt > 0:
+            self.buf.extend([u'\0'] * lgt)
 
     def write(self, string):
         length = len(string)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to