diff --git a/libs/CheatEngine.Client.Core/Domains/MemoryClient.cs b/libs/CheatEngine.Client.Core/Domains/MemoryClient.cs index 3cbd33e..98e0768 100644 --- a/libs/CheatEngine.Client.Core/Domains/MemoryClient.cs +++ b/libs/CheatEngine.Client.Core/Domains/MemoryClient.cs @@ -770,7 +770,7 @@ public int PointerSize { get { - ThrowIfUsable(); + ThrowIfUnusable(); if (_pointerSize != 0) { return _pointerSize; @@ -784,7 +784,7 @@ public int PointerSize public bool TryReadBytes(Address address, Span destination) { - ThrowIfUsable(); + ThrowIfUnusable(); if (_port.TryReadBytes(address, destination, out string? failure)) { Failure = null; @@ -797,7 +797,7 @@ public bool TryReadBytes(Address address, Span destination) public bool TryWriteBytes(Address address, ReadOnlySpan source) { - ThrowIfUsable(); + ThrowIfUnusable(); if (_port.TryWriteBytes(address, source, out string? failure)) { Failure = null; @@ -821,7 +821,7 @@ internal void Expire() Volatile.Write(ref _expired, 1); } - private void ThrowIfUsable() + private void ThrowIfUnusable() { if (Volatile.Read(ref _expired) != 0 || _activationEpoch != _lifetime.Epoch ||