summaryrefslogtreecommitdiff
path: root/Lib/chunk.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-09 13:41:18 +0000
committerGuido van Rossum <guido@python.org>1999-06-09 13:41:18 +0000
commit5e9b47b8e6f687f200c525b3c4840ca3bcd6c3f3 (patch)
tree6496813d7bb6b0fb17b9ec670da1a10b664f8a55 /Lib/chunk.py
parent7cc23e4bf5c822825a7f0566f4219c07aa1e965f (diff)
downloadcpython-5e9b47b8e6f687f200c525b3c4840ca3bcd6c3f3.tar.gz
Oops, Sjoerd was in a hurry. This patch from him fixes some length
math in the Chunk class.
Diffstat (limited to 'Lib/chunk.py')
-rw-r--r--Lib/chunk.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index 0a9abd255a..320339ef74 100644
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -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()