Browse Source

Bug 1591: Failure when updating jumplist

https://winscp.net/tracker/1591
(cherry picked from commit a307fd14d4fe1a5351f7372375bbc4fc2eff696a)

Source commit: 10abec4d41a35662afa24a87a07356089d686328
Martin Prikryl 7 years ago
parent
commit
8ae3f8c52c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      source/windows/Setup.cpp

+ 2 - 2
source/windows/Setup.cpp

@@ -1749,7 +1749,7 @@ static bool __fastcall AddJumpListCategory(TStrings * Names,
             Names->Strings[Index], L"", AdditionalParams, -1, IconIndex, true);
 
         wchar_t Desc[2048];
-        if (SUCCEEDED(Link->GetDescription(Desc, sizeof(Desc) - 1)))
+        if (SUCCEEDED(Link->GetDescription(Desc, LENOF(Desc) - 1)))
         {
           if (Removed->IndexOf(Desc) < 0)
           {
@@ -1828,7 +1828,7 @@ void __fastcall UpdateJumpList(TStrings * SessionNames, TStrings * WorkspaceName
           IShellLink * Link;
           wchar_t Desc[2048];
           if (SUCCEEDED(RemovedArray->GetAt(Index, IID_IShellLink, (void**)&Link)) &&
-              SUCCEEDED(Link->GetDescription(Desc, sizeof(Desc) - 1)))
+              SUCCEEDED(Link->GetDescription(Desc, LENOF(Desc) - 1)))
           {
             Removed->Add(Desc);
           }