Author: Brian Kearns <[email protected]>
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
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to