diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2013-06-04 13:19:49 +0400 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2013-06-04 13:19:49 +0400 |
commit | 2c1cbf319e4af29993cc495252ed060cde652c98 (patch) | |
tree | 9438399003b9f5456ee493fb221a175f6e902d34 /sphinx/util/png.py | |
parent | a1fc267c416945db2ec826ebbfc967a333b5366b (diff) | |
parent | 21de0f5edea8c8d54e34a1ad8533f2903d1bc7e7 (diff) |
merge stable for PR#141, #982
Diffstat (limited to 'sphinx/util/png.py')
-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 3adabadf9..61c428bfe 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: |