From b99c7349549b1a9597d13dcc25c264ab7ca3138c Mon Sep 17 00:00:00 2001 From: lordlou <87331798+lordlou@users.noreply.github.com> Date: Thu, 28 Dec 2023 06:14:13 -0500 Subject: [PATCH] SM: strict rom validation fix (#2632) added a more robust ROM tag validation to free oher games to use tag starting with "SM" followed by another letter (SMW, SMZ3, SMRPG, SMMR,...) --- worlds/sm/Client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/sm/Client.py b/worlds/sm/Client.py index df73ae47..756fd4bf 100644 --- a/worlds/sm/Client.py +++ b/worlds/sm/Client.py @@ -61,7 +61,7 @@ class SMSNIClient(SNIClient): from SNIClient import snes_buffered_write, snes_flush_writes, snes_read rom_name = await snes_read(ctx, SM_ROMNAME_START, ROMNAME_SIZE) - if rom_name is None or rom_name == bytes([0] * ROMNAME_SIZE) or rom_name[:2] != b"SM" or rom_name[:3] == b"SMW": + if rom_name is None or rom_name == bytes([0] * ROMNAME_SIZE) or rom_name[:2] != b"SM" or rom_name[2] not in b"1234567890": return False ctx.game = self.game