Avoid copying invalid data on error.

This commit is contained in:
Alexandre Julliard 2004-10-22 20:26:23 +00:00
parent a1779c1e33
commit 2d2e2e1e55
1 changed files with 3 additions and 0 deletions

View File

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