From e7daec78c708caa844da7db8e4cd12ed85a36e50 Mon Sep 17 00:00:00 2001 From: cidoku Date: Sat, 29 Mar 2025 21:12:18 -0300 Subject: [PATCH] take care not to cast pair offset if somehow empty --- gameview.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gameview.py b/gameview.py index d123820..5f7f2f8 100644 --- a/gameview.py +++ b/gameview.py @@ -2970,8 +2970,9 @@ class GUI(QtGui.QWidget): if "y_offset" in self.features: # AO 2.9 keyword = "" if "" in self.m_chatmessage[SELF_OFFSET] else "&" # i don't think it's hdf's fault but this is still ridiculous - hor_offset = int(self.m_chatmessage[SELF_OFFSET].split(keyword)[0]) - vert_offset = int(self.m_chatmessage[SELF_OFFSET].split(keyword)[1]) if len(self.m_chatmessage[SELF_OFFSET].split(keyword)) > 1 else 0 + offset = self.m_chatmessage[SELF_OFFSET].split(keyword) + hor_offset = int(offset[0]) if offset[0] else 0 + vert_offset = int(offset[1]) if len(offset) > 1 else 0 else: hor_offset = int(self.m_chatmessage[SELF_OFFSET])