diff options
author | Brian Kearns <bdkearns@gmail.com> | 2014-05-04 13:32:17 -0400 |
---|---|---|
committer | Brian Kearns <bdkearns@gmail.com> | 2014-05-04 13:32:17 -0400 |
commit | 01fd39ebd34fe8afcd4abf1ca881178636175bf1 (patch) | |
tree | 2893d74aa982b299242c9536c7488b8c7d9c62c3 | |
parent | remove loop from StringBuffer.getslice (diff) | |
download | pypy-01fd39ebd34fe8afcd4abf1ca881178636175bf1.tar.gz pypy-01fd39ebd34fe8afcd4abf1ca881178636175bf1.tar.bz2 pypy-01fd39ebd34fe8afcd4abf1ca881178636175bf1.zip |
no need to calculate this
-rw-r--r-- | pypy/module/struct/formatiterator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pypy/module/struct/formatiterator.py b/pypy/module/struct/formatiterator.py index c59d0eeb3a..fbf448f8b4 100644 --- a/pypy/module/struct/formatiterator.py +++ b/pypy/module/struct/formatiterator.py @@ -133,7 +133,7 @@ class UnpackFormatIterator(FormatIterator): end = self.pos + count if end > self.length: raise StructError("unpack str size too short for format") - s = self.buf.getslice(self.pos, end, 1, end - self.pos) + s = self.buf.getslice(self.pos, end, 1, count) self.pos = end return s |