diff --git a/xbin.py b/xbin.py index 4724e6b..a061262 100644 --- a/xbin.py +++ b/xbin.py @@ -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 @@ -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