Skip to content

Commit

Permalink
Use collection expression.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Feb 14, 2024
1 parent 4731bc2 commit eabc0e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/memory/Code/FunctionHookGate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ private sealed class StackNormalizer : IDisposable

public StackNormalizer(GateContext context)
{
_frames = context._frames
_frames = [.. context._frames
.Select(f =>
{
var addr = *f.StackAddress;

*f.StackAddress = f.ReturnAddress;

return (f, (nuint)addr);
})
.ToArray();
})];
}

public void Dispose()
Expand Down

0 comments on commit eabc0e5

Please sign in to comment.