diff --git a/src/mudlib/zmachine/zmemory.py b/src/mudlib/zmachine/zmemory.py index 87c5d30..ade9adf 100644 --- a/src/mudlib/zmachine/zmemory.py +++ b/src/mudlib/zmachine/zmemory.py @@ -235,18 +235,18 @@ class ZMemory: def word_address(self, address): """Return the 'actual' address of word address ADDRESS.""" - if address < 0 or address > (self._total_size / 2): + if address < 0 or address > (self._total_size // 2): raise ZMemoryOutOfBounds return address * 2 def packed_address(self, address): """Return the 'actual' address of packed address ADDRESS.""" if 1 <= self.version <= 3: - if address < 0 or address > (self._total_size / 2): + if address < 0 or address > (self._total_size // 2): raise ZMemoryOutOfBounds return address * 2 elif 4 <= self.version <= 5: - if address < 0 or address > (self._total_size / 4): + if address < 0 or address > (self._total_size // 4): raise ZMemoryOutOfBounds return address * 4 else: diff --git a/src/mudlib/zmachine/zobjectparser.py b/src/mudlib/zmachine/zobjectparser.py index dfcecf2..c65f276 100644 --- a/src/mudlib/zmachine/zobjectparser.py +++ b/src/mudlib/zmachine/zobjectparser.py @@ -169,12 +169,12 @@ class ZObjectParser: if 1 <= self._memory.version <= 3: if not (0 <= attrnum <= 31): raise ZObjectIllegalAttributeNumber - bf = BitField(self._memory[object_addr + (attrnum / 8)]) + bf = BitField(self._memory[object_addr + (attrnum // 8)]) elif 4 <= self._memory.version <= 5: if not (0 <= attrnum <= 47): raise ZObjectIllegalAttributeNumber - bf = BitField(self._memory[object_addr + (attrnum / 8)]) + bf = BitField(self._memory[object_addr + (attrnum // 8)]) else: raise ZObjectIllegalVersion