diff --git a/fast64_internal/sm64/animation/classes.py b/fast64_internal/sm64/animation/classes.py index d11f612b6..cac8e9810 100644 --- a/fast64_internal/sm64/animation/classes.py +++ b/fast64_internal/sm64/animation/classes.py @@ -115,7 +115,7 @@ def read_binary(self, indices_reader: RomReader, values_reader: RomReader, bone_ indices_values = np.frombuffer(indices_reader.read_data(indices_size), dtype=">u2") for i in range(0, len(indices_values), 2): max_frame, offset = indices_values[i], indices_values[i + 1] - address, size = values_reader.start_address + (offset * 2), max_frame * 2 + address, size = values_reader.start_address + int(offset * 2), int(max_frame) * 2 values = np.frombuffer(values_reader.read_data(size, address), dtype=">i2", count=max_frame) self.pairs.append(SM64_AnimPair(values, address, address + size, offset).clean_frames()) diff --git a/fast64_internal/utility.py b/fast64_internal/utility.py index 7874eacd9..cccd9bea2 100644 --- a/fast64_internal/utility.py +++ b/fast64_internal/utility.py @@ -1438,6 +1438,7 @@ def bytesToHexClean(value, byteSize=4): def intToHex(value, byte_size=4, signed=True): + value = int(value) return format(value if signed else cast_integer(value, byte_size * 8, False), f"#0{(byte_size * 2 + 2)}x")