diff --git a/coilsnake/model/common/ips.py b/coilsnake/model/common/ips.py index 708b47a..6ffe416 100644 --- a/coilsnake/model/common/ips.py +++ b/coilsnake/model/common/ips.py @@ -128,7 +128,8 @@ def create(self, clean_rom, hacked_rom, patch_path): records[i] = t else: i -= 1 - records[i] = hr.to_list()[i] + index -= 1 + records[i] = hr.__getitem__(i).to_bytes(1, byteorder='big') if index < cr.__len__() and index < hr.__len__(): s = cr.__getitem__(index).to_bytes(1, byteorder='big') t = hr.__getitem__(index).to_bytes(1, byteorder='big') @@ -143,4 +144,4 @@ def create(self, clean_rom, hacked_rom, patch_path): pfile.write(len(records[r]).to_bytes(2, byteorder='big')) pfile.write(records[r]) pfile.write(b"EOF") - pfile.close() \ No newline at end of file + pfile.close()