mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 00:54:18 +00:00
Fix an infinite loop if environment variable is not defined
svn path=/trunk/; revision=23505
This commit is contained in:
parent
887690f26d
commit
afb2063fd3
1 changed files with 5 additions and 5 deletions
|
@ -1548,12 +1548,12 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest)
|
|||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
else
|
||||
hr = S_OK;
|
||||
if (SUCCEEDED(hr) && szDest[0] == '%')
|
||||
strcpyW(szTemp, szDest);
|
||||
else
|
||||
/* By default, terminate loop */
|
||||
szTemp[0] = '\0';
|
||||
if (SUCCEEDED(hr) && strcmpW(szSrc, szDest) != 0)
|
||||
{
|
||||
/* terminate loop */
|
||||
szTemp[0] = '\0';
|
||||
/* Continue the loop */
|
||||
strcpyW(szTemp, szDest);
|
||||
}
|
||||
}
|
||||
end:
|
||||
|
|
Loading…
Reference in a new issue