summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-09 13:41:18 (GMT)
committerGuido van Rossum <guido@python.org>1999-06-09 13:41:18 (GMT)
commit56b20595e6eba948ff86db24c2ce55bae70aa659 (patch)
treeb37040f237bc015ab5f411cc238303fbc7ca3236 /Lib
parent8ea7bb8e78e2b502c7ca237411aa79ac24347eca (diff)
downloadcpython-56b20595e6eba948ff86db24c2ce55bae70aa659.zip
cpython-56b20595e6eba948ff86db24c2ce55bae70aa659.tar.gz
cpython-56b20595e6eba948ff86db24c2ce55bae70aa659.tar.bz2
Oops, Sjoerd was in a hurry. This patch from him fixes some length
math in the Chunk class.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/chunk.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index 0a9abd2..320339e 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()