diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2013-06-04 09:19:49 +0000 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2013-06-04 09:19:49 +0000 |
| commit | 51197bb9c57da487f8e2c399e767cc8d6bd983d5 (patch) | |
| tree | 9438399003b9f5456ee493fb221a175f6e902d34 /sphinx/util | |
| parent | ffe03b31b71143e7eb4a5a62413e496657233752 (diff) | |
| parent | 20921dd1b58bf98cff0b718611e7df2ab7489682 (diff) | |
| download | sphinx-51197bb9c57da487f8e2c399e767cc8d6bd983d5.tar.gz | |
merge stable for PR#141, #982
Diffstat (limited to 'sphinx/util')
| -rw-r--r-- | sphinx/util/png.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/png.py b/sphinx/util/png.py index 3adabadf..61c428bf 100644 --- a/sphinx/util/png.py +++ b/sphinx/util/png.py @@ -51,7 +51,8 @@ def write_png_depth(filename, depth): # overwrite it with the depth chunk f.write(DEPTH_CHUNK_LEN + DEPTH_CHUNK_START + data) # calculate the checksum over chunk name and data - f.write(struct.pack('!i', binascii.crc32(DEPTH_CHUNK_START + data))) + crc = binascii.crc32(DEPTH_CHUNK_START + data) & 0xffffffff + f.write(struct.pack('!I', crc)) # replace the IEND chunk f.write(IEND_CHUNK) finally: |
