mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 22:25:46 -04:00
scripts: Signed ints for grAb in fix-gfx-offsets
The fix-gfx-offsets script incorrectly used unsigned integers (I) when interpreting grAb chunks, which resulted strange large values that are close to 2^32 in buildcfg.txt. The fix is to use signed integers (i).
This commit is contained in:
parent
e88e10208b
commit
98770096d3
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class Graphic(object):
|
||||||
reader = png.Reader(file=open(self.filepath, "rb"))
|
reader = png.Reader(file=open(self.filepath, "rb"))
|
||||||
for chunk in reader.chunks():
|
for chunk in reader.chunks():
|
||||||
if chunk[0] == "grAb":
|
if chunk[0] == "grAb":
|
||||||
self.xoffset, self.yoffset = struct.unpack(">II", chunk[1])
|
self.xoffset, self.yoffset = struct.unpack(">ii", chunk[1])
|
||||||
self.has_offset = True
|
self.has_offset = True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue