Skip to content

Commit 8ef3a7e

Browse files
committed
Enforce Integral Values for Various XBin Blocks
1 parent 23da875 commit 8ef3a7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xbin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def WritePartInfo(file, index, name):
458458

459459
@staticmethod
460460
def WritePartIndex(file, index):
461-
data = struct.pack('Hh', 0x745A, index)
461+
data = struct.pack('Hh', 0x745A, int(index))
462462
file.write(data)
463463

464464
@staticmethod
@@ -468,12 +468,12 @@ def WriteFramerate(file, framerate):
468468

469469
@staticmethod
470470
def WriteFrameCount(file, frame_count):
471-
data = struct.pack('Hxxi', 0xB917, frame_count)
471+
data = struct.pack('Hxxi', 0xB917, int(frame_count))
472472
file.write(data)
473473

474474
@staticmethod
475475
def WriteFrameIndex(file, frame):
476-
data = struct.pack('Hxxi', 0xC723, frame)
476+
data = struct.pack('Hxxi', 0xC723, int(frame))
477477
file.write(data)
478478

479479
@staticmethod

0 commit comments

Comments
 (0)