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 26c8266 commit fc5ecd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CaCommon/WixString.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,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 PanelSwCustomActions/ExecOnComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,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 @@ -1156,7 +1156,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 TidyBuild.custom.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildThisFileDirectory)TidyBuild.user.props" Condition="Exists('$(MSBuildThisFileDirectory)TidyBuild.user.props')"/>
<PropertyGroup>
<FullVersion>3.11.2</FullVersion>
<FullVersion>3.11.3</FullVersion>
<FullVersion Condition=" '$(GITHUB_RUN_NUMBER)'!='' ">$(FullVersion).$(GITHUB_RUN_NUMBER)</FullVersion>
<ProductName>PanelSwWixExtension</ProductName>
<Manufacturer>Panel::Software</Manufacturer>
Expand Down

0 comments on commit fc5ecd3

Please sign in to comment.