Skip to content

Commit

Permalink
fs: fully initialize _OVERLAPPED for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
theuni authored and fanquake committed Sep 14, 2022
1 parent 13fd9ee commit 02c9e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool FileLock::TryLock()
if (hFile == INVALID_HANDLE_VALUE) {
return false;
}
_OVERLAPPED overlapped = {0};
_OVERLAPPED overlapped = {};
if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
reason = GetErrorReason();
return false;
Expand Down

0 comments on commit 02c9e56

Please sign in to comment.