Skip to content

Commit

Permalink
Fix multi-string initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Jul 18, 2024
1 parent 132117a commit 70f1556
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CaCommon/WixString.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ class CWixString

if (!_pS)
{
hr = Format(L"%ls\0", sz);
hr = Format(L"%ls%lc", sz, L'\0');
ExitOnFailure(hr, "Failed to allocate string");
ExitFunction();
}
Expand Down
3 changes: 1 addition & 2 deletions src/PanelSwCustomActions/ExecOnComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ HRESULT CExecOnComponent::SetEnvironment(CWixString* pszEnvironmentMultiSz, cons
BOOL bFound = FALSE;
for (LPCWSTR szCurr = nullptr; SUCCEEDED(pszEnvironmentMultiSz->MultiStringGet(i, &szCurr)); ++i)
{
LPCWSTR szEqual = wcschr(szCurr, L'=');;
LPCWSTR szEqual = wcschr(szCurr, L'=');
DWORD dwLen1 = szEqual - szCurr;
if (!dwLen1 || !szEqual)
{
Expand Down Expand Up @@ -1149,7 +1149,6 @@ HRESULT CExecOnComponent::LaunchProcess(IMPERSONATION_CONTEXT* pctxImpersonation
bRes = ::CreateProcess(nullptr, szCommand, nullptr, nullptr, TRUE, ::GetPriorityClass(::GetCurrentProcess()) | CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT, (LPVOID)rgszEnvironment, szWorkingDirectory, &si, &pi);
ExitOnNullWithLastError(bRes, hr, "Failed to create process");
}
WcaLog(LOGLEVEL::LOGMSG_VERBOSE, "Launched process '%ls'", szCommand);

if (phStdOut)
{
Expand Down
2 changes: 1 addition & 1 deletion src/TidyBuild.custom.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)TidyBuild.user.props" Condition="Exists('$(MSBuildThisFileDirectory)TidyBuild.user.props')"/>
<PropertyGroup>
<FullVersion>5.1.1</FullVersion>
<FullVersion>5.1.2</FullVersion>
<FullVersion Condition=" '$(GITHUB_RUN_NUMBER)'!='' ">$(FullVersion).$(GITHUB_RUN_NUMBER)</FullVersion>
<ProductName>PanelSwWixExtension</ProductName>
<Manufacturer>Panel::Software</Manufacturer>
Expand Down

0 comments on commit 70f1556

Please sign in to comment.