From d551a4cf5a6fdf729a710c7f1091b8360cc42c68 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sun, 5 Nov 2023 17:49:03 +0200 Subject: [PATCH] fix(rom): fails if shuttle_id longer than 4 chars --- rom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rom.py b/rom.py index f2c0eb7..795de72 100644 --- a/rom.py +++ b/rom.py @@ -59,7 +59,8 @@ def write_rom(self): assert len(rom_text) < MAX_ROM_TEXT_SIZE, "ROM text too long" - rom[0:4] = map(segment_char, self.config["id"]) + shuttle_id = self.config["id"][:8] + rom[0 : len(shuttle_id)] = map(segment_char, shuttle_id) rom[8:16] = map(segment_char, short_sha.upper()) rom[32 : 32 + len(rom_text)] = rom_text.encode("ascii")