shell/source/win32/spsupp/spsuppHelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit fa86d95014242225e4c61bf644d3c3197f13d10b Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Feb 25 19:15:13 2024 +0600 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Feb 26 03:19:36 2024 +0100 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.kagan...@collabora.com> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> 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)