Fix decompiling GPKG on 64bit systems
array.array("L") reads 64bit ints, not 32bit. Use "I" instead.
diff --git a/Lib/fontTools/ttLib/tables/G_P_K_G_.py b/Lib/fontTools/ttLib/tables/G_P_K_G_.py
index 46175f5..8ffd2d6 100644
--- a/Lib/fontTools/ttLib/tables/G_P_K_G_.py
+++ b/Lib/fontTools/ttLib/tables/G_P_K_G_.py
@@ -23,7 +23,7 @@
def decompile(self, data, ttFont):
dummy, newData = sstruct.unpack2(GPKGFormat, data, self)
- GMAPoffsets = array.array("L")
+ GMAPoffsets = array.array("I")
endPos = (self.numGMAPs+1) * 4
GMAPoffsets.fromstring(newData[:endPos])
if sys.byteorder <> "big":
@@ -35,7 +35,7 @@
self.GMAPs.append(data[start:end])
pos = endPos
endPos = pos + (self.numGlyplets + 1)*4
- glyphletOffsets = array.array("L")
+ glyphletOffsets = array.array("I")
glyphletOffsets.fromstring(newData[pos:endPos])
if sys.byteorder <> "big":
glyphletOffsets.byteswap()