[RAPPS] StringCbCatW => StringCchCatW, sizeof() => _countof()
authorAlexander Shaposhnikov <sanchaez@reactos.org>
Thu, 29 Jun 2017 19:31:19 +0000 (19:31 +0000)
committerAlexander Shaposhnikov <sanchaez@reactos.org>
Thu, 29 Jun 2017 19:31:19 +0000 (19:31 +0000)
:(

svn path=/branches/GSoC_2017/rapps/; revision=75241

reactos/base/applications/rapps/winmain.cpp

index a5d8d8d..f065d8c 100644 (file)
@@ -56,12 +56,12 @@ FillDefaultSettings(PSETTINGS_INFO pSettingsInfo)
     pSettingsInfo->bLogEnabled = TRUE;
     if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, pSettingsInfo->szDownloadDir)))
     {
-        StringCbCatW(pSettingsInfo->szDownloadDir, sizeof(pSettingsInfo->szDownloadDir), L"\\RAPPS Downloads");
+        StringCchCatW(pSettingsInfo->szDownloadDir, _countof(pSettingsInfo->szDownloadDir), L"\\RAPPS Downloads");
     } 
     else
     {
         ExpandEnvironmentStringsW(L"%SystemDrive%\\RAPPS Downloads", 
-            pSettingsInfo->szDownloadDir, sizeof(pSettingsInfo->szDownloadDir));
+            pSettingsInfo->szDownloadDir, _countof(pSettingsInfo->szDownloadDir));
     }
 
     pSettingsInfo->bDelInstaller = FALSE;