mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 09:10:56 +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());
|
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||||
else
|
else
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
if (SUCCEEDED(hr) && szDest[0] == '%')
|
/* By default, terminate loop */
|
||||||
strcpyW(szTemp, szDest);
|
szTemp[0] = '\0';
|
||||||
else
|
if (SUCCEEDED(hr) && strcmpW(szSrc, szDest) != 0)
|
||||||
{
|
{
|
||||||
/* terminate loop */
|
/* Continue the loop */
|
||||||
szTemp[0] = '\0';
|
strcpyW(szTemp, szDest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
|
|
Loading…
Reference in a new issue