Skip to content

Commit

Permalink
Enforce Integral Values for Various XBin Blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
SE2Dev committed Jan 14, 2018
1 parent 23da875 commit 8ef3a7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def WritePartInfo(file, index, name):

@staticmethod
def WritePartIndex(file, index):
data = struct.pack('Hh', 0x745A, index)
data = struct.pack('Hh', 0x745A, int(index))
file.write(data)

@staticmethod
Expand All @@ -468,12 +468,12 @@ def WriteFramerate(file, framerate):

@staticmethod
def WriteFrameCount(file, frame_count):
data = struct.pack('Hxxi', 0xB917, frame_count)
data = struct.pack('Hxxi', 0xB917, int(frame_count))
file.write(data)

@staticmethod
def WriteFrameIndex(file, frame):
data = struct.pack('Hxxi', 0xC723, frame)
data = struct.pack('Hxxi', 0xC723, int(frame))
file.write(data)

@staticmethod
Expand Down

0 comments on commit 8ef3a7e

Please sign in to comment.