[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:
Hermès Bélusca-Maïto 2013-06-23 12:55:17 +00:00
parent 4c459af487
commit 4c66e672da

View file

@ -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);
/*