Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libs/CheatEngine.Client.Core/Domains/MemoryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ public int PointerSize
{
get
{
ThrowIfUsable();
ThrowIfUnusable();
if (_pointerSize != 0)
{
return _pointerSize;
Expand All @@ -784,7 +784,7 @@ public int PointerSize

public bool TryReadBytes(Address address, Span<byte> destination)
{
ThrowIfUsable();
ThrowIfUnusable();
if (_port.TryReadBytes(address, destination, out string? failure))
{
Failure = null;
Expand All @@ -797,7 +797,7 @@ public bool TryReadBytes(Address address, Span<byte> destination)

public bool TryWriteBytes(Address address, ReadOnlySpan<byte> source)
{
ThrowIfUsable();
ThrowIfUnusable();
if (_port.TryWriteBytes(address, source, out string? failure))
{
Failure = null;
Expand All @@ -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 ||
Expand Down