Skip to content

Commit

Permalink
Fixed crash on Win7.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolftein committed Feb 12, 2024
1 parent 72d9046 commit 4843fcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Public/Content/Locator/SystemLocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ namespace Content
{
Output = Chunk(::GetFileSize(Handle, nullptr));

::ReadFile(Handle, Output.GetData(), Output.GetSize(), nullptr, 0);
DWORD lpNumberOfBytesRead;
::ReadFile(Handle, Output.GetData(), Output.GetSize(), & lpNumberOfBytesRead, 0);

::CloseHandle(Handle);
}
Expand All @@ -69,7 +70,8 @@ namespace Content

if (Handle != INVALID_HANDLE_VALUE)
{
::WriteFile(Handle, Data.data(), Data.size_bytes(), nullptr, 0);
DWORD lpNumberOfBytesWritten;
::WriteFile(Handle, Data.data(), Data.size_bytes(), & lpNumberOfBytesWritten, 0);

::CloseHandle(Handle);
}
Expand Down

0 comments on commit 4843fcd

Please sign in to comment.