From 8ef3a7e47c83bba1a6d89fce757d577e55335074 Mon Sep 17 00:00:00 2001 From: SE2Dev Date: Fri, 12 Jan 2018 16:39:47 -0500 Subject: [PATCH] Enforce Integral Values for Various XBin Blocks --- xbin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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