cmd: Do not omit mandatory argument to WriteFile.

Thomas Faber thomas.faber at reactos.org
Sat Jul 12 04:21:08 CDT 2014


From e316e3c1a7a631aa22325744395db51450ce8863 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thomas.faber at reactos.org>
Date: Sat, 12 Jul 2014 10:39:13 +0200
Subject: cmd: Do not omit mandatory argument to WriteFile.

---
 programs/cmd/builtins.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 4c95b43..f4f06de 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 byteswritten;
 
     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, &byteswritten, NULL)) {
         WINE_ERR("Failed to append EOF to %s (%d)\n", wine_dbgstr_w(filename), GetLastError());
         CloseHandle(h);
         return FALSE;
-- 
1.9.0.msysgit.0



More information about the wine-patches mailing list