mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 10:30:59 +00:00
[KERNEL32]: Fix the newline adding (see r63361).
svn path=/trunk/; revision=63363
This commit is contained in:
parent
ab209b91b5
commit
3384092338
|
@ -290,8 +290,7 @@ BaseCheckVDM(IN ULONG BinaryType,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate memory for the ANSI strings */
|
/* Allocate memory for the ANSI strings */
|
||||||
|
// We need to add the two newline characters '\r\n' to the command line
|
||||||
/* For the command line we need to add two characters needed for newline '\r\n' */
|
|
||||||
AnsiCmdLine = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CheckVdm->CmdLen + 2);
|
AnsiCmdLine = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CheckVdm->CmdLen + 2);
|
||||||
AnsiAppName = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CheckVdm->AppLen);
|
AnsiAppName = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CheckVdm->AppLen);
|
||||||
AnsiCurDirectory = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CheckVdm->CurDirectoryLen);
|
AnsiCurDirectory = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CheckVdm->CurDirectoryLen);
|
||||||
|
@ -325,11 +324,11 @@ BaseCheckVDM(IN ULONG BinaryType,
|
||||||
CheckVdm->CmdLen,
|
CheckVdm->CmdLen,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
/* Add a needed newline '\r\n' */
|
/* Add a needed newline '\r\n' and NULL-terminate */
|
||||||
CheckVdm->CmdLen--; // FIXME....
|
CheckVdm->CmdLen--; // Rewind back to the NULL character
|
||||||
AnsiCmdLine[CheckVdm->CmdLen ] = '\r';
|
AnsiCmdLine[CheckVdm->CmdLen++] = '\r';
|
||||||
AnsiCmdLine[CheckVdm->CmdLen + 1] = '\n';
|
AnsiCmdLine[CheckVdm->CmdLen++] = '\n';
|
||||||
CheckVdm->CmdLen += 2;
|
AnsiCmdLine[CheckVdm->CmdLen++] = 0;
|
||||||
|
|
||||||
/* Convert the short application name into an ANSI string */
|
/* Convert the short application name into an ANSI string */
|
||||||
WideCharToMultiByte(CP_ACP,
|
WideCharToMultiByte(CP_ACP,
|
||||||
|
|
Loading…
Reference in a new issue