summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-25 19:15:13 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-02-26 03:19:36 +0100
commitfa86d95014242225e4c61bf644d3c3197f13d10b (patch)
treedd1551f1bc5e5b9460611e0d3f080702cca60a91 /shell
parent3fef8ba99222f5c82d56b4acfb3a07afbaa8364b (diff)
Replace an instance of MAX_PATH with 32767
... which is the approximate maximum of Windows API, as documented in https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Change-Id: I152b0b499374167720d73a475f2502e52fc5a5dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163910 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/spsupp/spsuppHelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/source/win32/spsupp/spsuppHelper.cxx b/shell/source/win32/spsupp/spsuppHelper.cxx
index af3509b87c8b..9ee49401a3c8 100644
--- a/shell/source/win32/spsupp/spsuppHelper.cxx
+++ b/shell/source/win32/spsupp/spsuppHelper.cxx
@@ -31,8 +31,8 @@ const OUString& GetSofficeExe()
{
static const OUString s_sPath = []() {
OUString result;
- wchar_t sPath[MAX_PATH];
- if (GetModuleFileNameW(nullptr, sPath, MAX_PATH) == 0)
+ wchar_t sPath[32767];
+ if (GetModuleFileNameW(nullptr, sPath, std::size(sPath)) == 0)
return result;
wchar_t* pSlashPos = wcsrchr(sPath, L'\\');
if (pSlashPos == nullptr)