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