Commit 185f42d9 authored by Jack Jansen's avatar Jack Jansen

struct.pack has become picky about h (short) and H (unsigned short).

parent 339ecc61
......@@ -13,7 +13,7 @@ def mkpixmap(w, h, fmt, data):
"""kludge a pixmap together"""
fmtinfo = _fmt_to_mac[fmt]
rv = struct.pack("lhhhhhhhlllhhhhlll",
rv = struct.pack("lHhhhhhhlllhhhhlll",
id(data)+MacOS.string_id_to_buffer, # HACK HACK!!
w*2 + 0x8000,
0, 0, h, w,
......
......@@ -15,7 +15,7 @@ import imgformat
# PixMap data structure element format (as used with struct)
_pmElemFormat = {
'baseAddr':'l', # address of pixel data
'rowBytes':'h', # bytes per row, plus 0x8000
'rowBytes':'H', # bytes per row, plus 0x8000
'bounds':'hhhh', # coordinates imposed over pixel data
'top':'h',
'left':'h',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment