[pypy-commit] pypy default: no need to calculate this

bdkearns noreply at buildbot.pypy.org
Sun May 4 20:25:02 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: 
Changeset: r71263:04ddb47ecbe6
Date: 2014-05-04 13:32 -0400
http://bitbucket.org/pypy/pypy/changeset/04ddb47ecbe6/

Log:	no need to calculate this

diff --git a/pypy/module/struct/formatiterator.py b/pypy/module/struct/formatiterator.py
--- a/pypy/module/struct/formatiterator.py
+++ b/pypy/module/struct/formatiterator.py
@@ -133,7 +133,7 @@
         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
 


More information about the pypy-commit mailing list