mirror of
https://github.com/reactos/reactos.git
synced 2025-05-31 06:58:10 +00:00
[KERNEL32]
Never EVER process instructions INSIDE a debug macro (e.g. ASSERT) because when compiling in Release Mode, the code isn't executed at all. Fix that. See revision r59310 for more details. svn path=/branches/ntvdm/; revision=59314
This commit is contained in:
parent
4c459af487
commit
4c66e672da
1 changed files with 8 additions and 1 deletions
|
@ -2541,6 +2541,7 @@ CreateProcessInternalW(HANDLE hToken,
|
|||
WCHAR SaveChar = 0;
|
||||
ULONG RetVal;
|
||||
UINT Error = 0;
|
||||
UINT Length;
|
||||
BOOLEAN SearchDone = FALSE;
|
||||
BOOLEAN Escape = FALSE;
|
||||
CLIENT_ID ClientId;
|
||||
|
@ -2630,7 +2631,13 @@ CreateProcessInternalW(HANDLE hToken,
|
|||
}
|
||||
|
||||
/* Get the path to the VDM host */
|
||||
ASSERT(GetSystemDirectoryW(VdmPath, MAX_PATH - wcslen(NTVDM_STRING)) != 0);
|
||||
Length = GetSystemDirectoryW(VdmPath, MAX_PATH - wcslen(NTVDM_STRING));
|
||||
if ((Length == 0) || (Length >= MAX_PATH - wcslen(NTVDM_STRING)))
|
||||
{
|
||||
/* System path not found for some reason, fail */
|
||||
SetLastError(ERROR_INVALID_NAME);
|
||||
return FALSE;
|
||||
}
|
||||
wcscat(VdmPath, NTVDM_STRING);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue