]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Oops, Sjoerd was in a hurry. This patch from him fixes some length
authorGuido van Rossum <guido@python.org>
Wed, 9 Jun 1999 13:41:18 +0000 (13:41 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 9 Jun 1999 13:41:18 +0000 (13:41 +0000)
math in the Chunk class.

Lib/chunk.py

index 0a9abd255a63e4a4ba44d17747ea76b13a6e60c5..320339ef74199f8173e38d69f3417a8c7e063e24 100644 (file)
@@ -61,6 +61,7 @@ class Chunk:
             self.chunksize = struct.unpack('>l', file.read(4))[0]
         except struct.error:
             raise EOFError
+        self.chunksize = self.chunksize - 8 # subtract header
         self.size_read = 0
         self.offset = self.file.tell()