diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/StringIO.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 90f848a..12d19a1 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -48,8 +48,8 @@ class StringIO: self.pos = max(0, pos) def tell(self): return self.pos - def read(self, n = 0): - if n <= 0: + def read(self, n = -1): + if n < 0: newpos = len(self.buf) else: newpos = min(self.pos+n, len(self.buf)) |