File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
44 * PURPOSE: Utility routines
55 * COPYRIGHT: Copyright 2024 Whindmar Saksit <whindsaks@proton.me>
6+ * Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
67 */
78
89#include " objects.h"
10+ #include < strsafe.h>
911
1012#include < wine/debug.h>
1113WINE_DEFAULT_DEBUG_CHANNEL (shdocvw);
@@ -209,7 +211,7 @@ AddUrlToFavorites(
209211 // Get title
210212 WCHAR szTitle[MAX_PATH];
211213 if (pszTitleW)
212- lstrcpynW (szTitle, pszTitleW, _countof (szTitle));
214+ StringCchCopyW (szTitle, _countof (szTitle), pszTitleW );
213215 else
214216 ILGetDisplayNameEx (NULL , pidl, szTitle, ILGDN_NORMAL);
215217
@@ -219,7 +221,7 @@ AddUrlToFavorites(
219221 // Build shortcut pathname
220222 WCHAR szPath[MAX_PATH];
221223 if (!SHGetSpecialFolderPathW (hwnd, szPath, CSIDL_FAVORITES, TRUE ))
222- SHGetSpecialFolderPathW (hwnd, szPath, CSIDL_COMMON_FAVORITES, TRUE ) ;
224+ return E_FAIL ;
223225 PathAppendW (szPath, szTitle);
224226 PathAddExtensionW (szPath, L" .lnk" );
225227
You can’t perform that action at this time.
0 commit comments