Avoid copying invalid data on error.
This commit is contained in:
parent
a1779c1e33
commit
2d2e2e1e55
|
@ -1617,8 +1617,11 @@ HRESULT WINAPI SHGetFolderPathW(
|
|||
default:
|
||||
FIXME("bogus type %d, please fix\n", type);
|
||||
hr = E_INVALIDARG;
|
||||
break;
|
||||
}
|
||||
|
||||
if (FAILED(hr)) goto end;
|
||||
|
||||
/* Expand environment strings if necessary */
|
||||
if (*szTemp == '%')
|
||||
hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath);
|
||||
|
|
Loading…
Reference in New Issue