Fix a regression of pluginsAdmin
Fix a regression of pluginsAdmin reported in: https://community.notepad-plus-plus.org/topic/21853/notepad-8-1-5-rc2/3?_=1632245574765
This commit is contained in:
parent
635f1d41ab
commit
a7a700145d
|
@ -69,17 +69,14 @@ void Version::setVersionFrom(const generic_string& filePath)
|
||||||
{
|
{
|
||||||
if (!filePath.empty() && ::PathFileExists(filePath.c_str()))
|
if (!filePath.empty() && ::PathFileExists(filePath.c_str()))
|
||||||
{
|
{
|
||||||
DWORD handle = 0;
|
DWORD uselessArg = 0; // this variable is for passing the ignored argument to the functions
|
||||||
DWORD bufferSize = ::GetFileVersionInfoSize(filePath.c_str(), &handle);
|
DWORD bufferSize = ::GetFileVersionInfoSize(filePath.c_str(), &uselessArg);
|
||||||
|
|
||||||
if (handle == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (bufferSize <= 0)
|
if (bufferSize <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unsigned char* buffer = new unsigned char[bufferSize];
|
unsigned char* buffer = new unsigned char[bufferSize];
|
||||||
::GetFileVersionInfo(filePath.c_str(), handle, bufferSize, buffer);
|
::GetFileVersionInfo(filePath.c_str(), uselessArg, bufferSize, buffer);
|
||||||
|
|
||||||
VS_FIXEDFILEINFO* lpFileInfo = nullptr;
|
VS_FIXEDFILEINFO* lpFileInfo = nullptr;
|
||||||
UINT cbFileInfo = 0;
|
UINT cbFileInfo = 0;
|
||||||
|
|
Loading…
Reference in New Issue