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