Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Marsev <alex.marsev@gmail.com>2013-05-15 08:12:22 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2013-05-15 14:26:21 +0400
commita7e2fea25e36119075d65e0c8a1cc3bcb457546a (patch)
tree0efc28e9daf42c276680a5d7f8a4abfdbc0c953c /src
parentdfc6f028729fc05e22fe1e7dd9207f2664f8f8a4 (diff)
CIfo: fix an incompatible call to WriteFile()
That was producing a crash in windows versions prior to 8. Fixes #3143
Diffstat (limited to 'src')
-rw-r--r--src/mpc-hc/Ifo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mpc-hc/Ifo.cpp b/src/mpc-hc/Ifo.cpp
index 5c3c74e38..919f94b50 100644
--- a/src/mpc-hc/Ifo.cpp
+++ b/src/mpc-hc/Ifo.cpp
@@ -268,7 +268,8 @@ bool CIfo::SaveFile(LPCTSTR strFile)
HANDLE hFile = Real_CreateFileW(strFile, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
if (hFile != INVALID_HANDLE_VALUE) {
- if (WriteFile(hFile, m_pBuffer, m_dwSize, nullptr, nullptr)) {
+ DWORD written;
+ if (WriteFile(hFile, m_pBuffer, m_dwSize, &written, nullptr)) {
bRet = true;
}
CloseHandle(hFile);