Commit 56b20595 authored by Guido van Rossum's avatar Guido van Rossum

Oops, Sjoerd was in a hurry. This patch from him fixes some length

math in the Chunk class.
parent 8ea7bb8e
...@@ -61,6 +61,7 @@ class Chunk: ...@@ -61,6 +61,7 @@ class Chunk:
self.chunksize = struct.unpack('>l', file.read(4))[0] self.chunksize = struct.unpack('>l', file.read(4))[0]
except struct.error: except struct.error:
raise EOFError raise EOFError
self.chunksize = self.chunksize - 8 # subtract header
self.size_read = 0 self.size_read = 0
self.offset = self.file.tell() self.offset = self.file.tell()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment