From aa99d10186c1f608bf7f4877fa6e1f252767388d Mon Sep 17 00:00:00 2001 From: Mc-muffin <8714476+Mc-muffin@users.noreply.github.com> Date: Mon, 22 May 2023 10:33:47 -0500 Subject: [PATCH] fix insertion memes --- pythonlib/games/ToolsTales.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pythonlib/games/ToolsTales.py b/pythonlib/games/ToolsTales.py index 34ffa5b..b1b57f1 100644 --- a/pythonlib/games/ToolsTales.py +++ b/pythonlib/games/ToolsTales.py @@ -490,7 +490,7 @@ class ToolsTales: else: output += struct.pack("H", self.ijsonTblTags["TBL"].get(c, int.from_bytes(c.encode("cp932"), "big"))) + if c in self.PRINTABLE_CHARS: + output += c.encode("cp932") + else: + output += struct.pack(">H", self.ijsonTblTags["TBL"].get(c, int.from_bytes(c.encode("cp932"), "big"))) return output