From 20dcd96de3622322e7ba3840e14e7666dccdbb02 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Tue, 25 Mar 2014 08:37:17 +0100 Subject: [PATCH] gameux/tests: Avoid a variable-length array. --- dlls/gameux/tests/gamestatistics.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c index 7d57b1f7f7b..f5dd2abe409 100644 --- a/dlls/gameux/tests/gamestatistics.c +++ b/dlls/gameux/tests/gamestatistics.c @@ -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)) {