From 886041d736b5eb56585fdde85a7c1593ae4020da Mon Sep 17 00:00:00 2001 From: Nayla Hanegan Date: Wed, 24 Jul 2024 22:49:21 -0400 Subject: [PATCH] add back invalid asm dialog --- main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index 89b444c..fba44d6 100644 --- a/main.py +++ b/main.py @@ -69,13 +69,13 @@ def patch(self): # Preprocess ASM code: add commas between instructions if missing asm_lines = preprocess_asm_code(asmRaw) - #try: - gscode_lines = injector_lib.asm_to_gameshark(memory_address_start, asm_lines) - self.output.delete("1.0", tk.END) - self.output.insert(tk.END, '\n'.join(gscode_lines)) - #except Exception as e: - # createDialog("Error", "error", "Invalid ASM code.") - # return + try: + gscode_lines = injector_lib.asm_to_gameshark(memory_address_start, asm_lines) + self.output.delete("1.0", tk.END) + self.output.insert(tk.END, '\n'.join(gscode_lines)) + except Exception as e: + createDialog("Error", "error", "Invalid ASM code.") + return def preprocess_asm_code(asmRaw): # Split by lines