gameux/tests: Avoid a variable-length array.

This commit is contained in:
Thomas Faber 2014-03-25 08:37:17 +01:00 committed by Alexandre Julliard
parent 4b1fb32d9d
commit 20dcd96de3
1 changed files with 2 additions and 4 deletions

View File

@ -130,15 +130,13 @@ static HRESULT _buildStatisticsFilePath(LPCGUID guidApplicationId, LPWSTR *lpSta
'l','o','r','e','r','\\','G','a','m','e','S','t','a','t','i','s',
't','i','c','s','\\',0};
static const WCHAR sDotGamestats[] = {'.','g','a','m','e','s','t','a','t','s',0};
static const DWORD dwGuidLength = 49;
HRESULT hr;
WCHAR sGuid[dwGuidLength], sPath[MAX_PATH] = {0};
WCHAR sGuid[49], sPath[MAX_PATH];
hr = pSHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, sPath);
if(SUCCEEDED(hr))
hr = (StringFromGUID2(guidApplicationId, sGuid, dwGuidLength)!=0 ? S_OK : E_FAIL);
hr = (StringFromGUID2(guidApplicationId, sGuid, sizeof(sGuid) / sizeof(sGuid[0])) != 0 ? S_OK : E_FAIL);
if(SUCCEEDED(hr))
{