Thomas Faber : cmd: Do not omit mandatory argument to WriteFile.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 14 14:52:32 CDT 2014


Module: wine
Branch: master
Commit: d4c4f0ab95871201ff120b6382bfbe722293d539
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d4c4f0ab95871201ff120b6382bfbe722293d539

Author: Thomas Faber <thomas.faber at reactos.org>
Date:   Sat Jul 12 10:39:13 2014 +0200

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..cb7dfef 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;




More information about the wine-cvs mailing list