mirror of
https://github.com/reactos/reactos.git
synced 2024-07-30 16:18:43 +00:00
[NTVDM]
Fix the command line NULL-termination. svn path=/trunk/; revision=63538
This commit is contained in:
parent
a579b9e6b6
commit
36d73c2c62
|
@ -915,6 +915,7 @@ DWORD DosLoadExecutable(IN DOS_EXEC_TYPE LoadType,
|
|||
PIMAGE_DOS_HEADER Header;
|
||||
PDWORD RelocationTable;
|
||||
PWORD RelocWord;
|
||||
LPSTR CmdLinePtr = (LPSTR)CommandLine;
|
||||
|
||||
DPRINT1("DosLoadExecutable(%d, %s, %s, %s, 0x%08X, 0x%08X)\n",
|
||||
LoadType,
|
||||
|
@ -931,8 +932,8 @@ DWORD DosLoadExecutable(IN DOS_EXEC_TYPE LoadType,
|
|||
}
|
||||
|
||||
/* NULL-terminate the command line by removing the return carriage character */
|
||||
while (*CommandLine && *CommandLine != '\r') CommandLine++;
|
||||
*(LPSTR)CommandLine = '\0';
|
||||
while (*CmdLinePtr && *CmdLinePtr != '\r') CmdLinePtr++;
|
||||
*CmdLinePtr = '\0';
|
||||
|
||||
/* Open a handle to the executable */
|
||||
FileHandle = CreateFileA(ExecutablePath,
|
||||
|
|
Loading…
Reference in a new issue