diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 4c95b43c72d..cb7dfefbe1a 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -436,6 +436,7 @@ void WCMD_choice (const WCHAR * args) { static BOOL WCMD_AppendEOF(WCHAR *filename) { HANDLE h; + DWORD bytes_written; char eof = '\x1a'; @@ -448,7 +449,7 @@ static BOOL WCMD_AppendEOF(WCHAR *filename) return FALSE; } else { SetFilePointer (h, 0, NULL, FILE_END); - if (!WriteFile(h, &eof, 1, NULL, NULL)) { + if (!WriteFile(h, &eof, 1, &bytes_written, NULL)) { WINE_ERR("Failed to append EOF to %s (%d)\n", wine_dbgstr_w(filename), GetLastError()); CloseHandle(h); return FALSE;