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: I5cd3c5e384005341aa2c39b18b3302521e71a805
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163908
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski 2024-02-25 19:13:10 +06:00
parent 7dd7cdc7af
commit cb12053fc5

View file

@ -300,12 +300,12 @@ namespace /* private */
STDAPI DllRegisterServer()
{
WCHAR ModuleFileName[MAX_PATH];
WCHAR ModuleFileName[32767];
GetModuleFileNameW(
GetCurrentModuleHandle(),
ModuleFileName,
sizeof(ModuleFileName)/sizeof(ModuleFileName[0]));
std::size(ModuleFileName));
HRESULT hr = S_OK;