From: Mikko Rasa Date: Sun, 31 Oct 2021 17:46:51 +0000 (+0200) Subject: Pass security attributes to the correct argument of CreateFile X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=5a7b517ae002d03f02a49beb8b680f17f6f517f1 Pass security attributes to the correct argument of CreateFile --- 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();