cmd: Do not omit mandatory argument to WriteFile.
This commit is contained in:
parent
07ca1afbd3
commit
d4c4f0ab95
|
@ -436,6 +436,7 @@ void WCMD_choice (const WCHAR * args) {
|
||||||
static BOOL WCMD_AppendEOF(WCHAR *filename)
|
static BOOL WCMD_AppendEOF(WCHAR *filename)
|
||||||
{
|
{
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
|
DWORD bytes_written;
|
||||||
|
|
||||||
char eof = '\x1a';
|
char eof = '\x1a';
|
||||||
|
|
||||||
|
@ -448,7 +449,7 @@ static BOOL WCMD_AppendEOF(WCHAR *filename)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
SetFilePointer (h, 0, NULL, FILE_END);
|
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());
|
WINE_ERR("Failed to append EOF to %s (%d)\n", wine_dbgstr_w(filename), GetLastError());
|
||||||
CloseHandle(h);
|
CloseHandle(h);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue