From 9351fb45caab39a76e2773258a0816ce59aeb9a7 Mon Sep 17 00:00:00 2001 From: PoryGone <98504756+PoryGone@users.noreply.github.com> Date: Fri, 8 Dec 2023 01:17:12 -0500 Subject: [PATCH] SA2B: Fix KeyError on Unexpected Characters in Slot Names (#2571) There were no safeguards on characters being used as keys into a conversion dict. Now there are. --- worlds/sa2b/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/sa2b/__init__.py b/worlds/sa2b/__init__.py index 4ee03dce9dc0..7d77aebc4caf 100644 --- a/worlds/sa2b/__init__.py +++ b/worlds/sa2b/__init__.py @@ -619,7 +619,7 @@ def generate_chao_name_data(self) -> typing.Dict[int, int]: for name in name_list_base: for char_idx in range(7): if char_idx < len(name): - name_list_s.append(chao_name_conversion[name[char_idx]]) + name_list_s.append(chao_name_conversion.get(name[char_idx], 0x5F)) else: name_list_s.append(0x00)