diff --git a/src/mudlib/zmachine/zmemory.py b/src/mudlib/zmachine/zmemory.py index 4f0f012..87c5d30 100644 --- a/src/mudlib/zmachine/zmemory.py +++ b/src/mudlib/zmachine/zmemory.py @@ -262,17 +262,12 @@ class ZMemory: """Write the given 16-bit value at ADDRESS, ADDRESS+1.""" if address < 0 or address >= (self._total_size - 1): raise ZMemoryOutOfBounds - # Handle writing of a word to the game headers. If write_word is - # used for this, we assume that it's the game that is setting the - # header. The interpreter should use the specialized method. value_msb = (value >> 8) & 0xFF value_lsb = value & 0xFF - if 0 <= address < 64: - self.game_set_header(address, value_msb) - self.game_set_header(address + 1, value_lsb) - else: - self._memory[address] = value_msb - self._memory[address + 1] = value_lsb + self._check_static(address) + self._check_static(address + 1) + self._memory[address] = value_msb + self._memory[address + 1] = value_lsb # Normal sequence syntax cannot be used to set bytes in the 64-byte # header. Instead, the interpreter or game must call one of the