diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-02-21 10:39:35 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-02-21 10:39:35 (GMT) |
commit | 2d0589be6739e15bc27ab8996ee0727a5a3dda51 (patch) | |
tree | b8eb728af7ddbcd35c7ff9ca9d35894d39c5c07c /Lib | |
parent | 0009c4ea590b5bb4c00c33bc96dca47a42e720f1 (diff) | |
download | cpython-2d0589be6739e15bc27ab8996ee0727a5a3dda51.zip cpython-2d0589be6739e15bc27ab8996ee0727a5a3dda51.tar.gz cpython-2d0589be6739e15bc27ab8996ee0727a5a3dda51.tar.bz2 |
The code to write timestamps couldn't handle negative times (and time
on the Mac is negativevalues > 0x80000000). Fixed.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/gzip.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py index 8e34ed2..6cb90ac6 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -19,6 +19,8 @@ def write32(output, value): output.write(struct.pack("<l", value)) def write32u(output, value): + if value < 0: + value = value + 0x100000000L output.write(struct.pack("<L", value)) def read32(input): |