From 5a7b517ae002d03f02a49beb8b680f17f6f517f1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 31 Oct 2021 19:46:51 +0200 Subject: [PATCH] Pass security attributes to the correct argument of CreateFile --- source/io/windows/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/io/windows/file.cpp b/source/io/windows/file.cpp index 90c5bb5..a388ade 100644 --- a/source/io/windows/file.cpp +++ b/source/io/windows/file.cpp @@ -38,7 +38,7 @@ void File::platform_init(const string &fn, CreateMode cm) sec_attr.lpSecurityDescriptor = nullptr; sec_attr.bInheritHandle = !!(mode&M_INHERIT); - *handle = CreateFile(fn.c_str(), flags, share_flags, nullptr, create_flags, FILE_ATTRIBUTE_NORMAL, &sec_attr); + *handle = CreateFile(fn.c_str(), flags, share_flags, &sec_attr, create_flags, FILE_ATTRIBUTE_NORMAL, nullptr); if(!handle) { int err = GetLastError(); -- 2.43.0