Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
erfg12 committed Jan 17, 2020
1 parent 5a2ae59 commit 042db0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Memory/memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ public UIntPtr CreateCodeCave(string code, byte[] newBytes, int replaceCount, in

// Failed to allocate memory around the address we wanted let windows handle it and hope for the best?
if (caveAddress == UIntPtr.Zero)
caveAddress = VirtualAllocEx(pHandle, UIntPtr.Zero, (uint)allocationSize, MEM_COMMIT | MEM_RESERVE,
caveAddress = VirtualAllocEx(pHandle, UIntPtr.Zero, (uint)size, MEM_COMMIT | MEM_RESERVE,
PAGE_EXECUTE_READWRITE);

int nopsNeeded = replaceCount > 5 ? replaceCount - 5 : 0;
Expand Down

0 comments on commit 042db0c

Please sign in to comment.