summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-13 09:58:29 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-14 08:07:32 +0100
commitacf00a90166bd17198e5b3c9fb2417dd0bd45deb (patch)
tree07aa4741e53482ca2e3eedb83580d8c8e8c73400 /desktop
parent018070500f7f001233f5622d656fc29494620d3f (diff)
Fix number of actual arguments
Change-Id: I04bb3462948aeab24d46ee7ee910fdae8da2aa65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160674 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit 8adfdb2a6dad7b6d67c1557c2a0160a53eec7cfe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160649
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/updater.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 5596028b0f79..fa3836596cc3 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -165,7 +165,7 @@ void createStr(const OUString& rStr, CharT** pArgs, size_t i)
pArgs[i] = pStr;
}
-CharT** createCommandLine()
+CharT** createCommandLine(int * argc)
{
OUString aInstallDir = Updater::getInstallationPath();
@@ -231,6 +231,7 @@ CharT** createCommandLine()
pArgs[nArgs - 1] = nullptr;
+ *argc = nArgs - 1;
return pArgs;
}
@@ -297,7 +298,8 @@ bool update()
OUString aUpdaterPath = getPathFromURL(aTempDirURL + "/" + OUString::fromUtf8(pUpdaterName));
Updater::log("Calling the updater with parameters: ");
- CharT** pArgs = createCommandLine();
+ int argc;
+ CharT** pArgs = createCommandLine(&argc);
bool bSuccess = true;
const char* pUpdaterTestReplace = std::getenv("LIBO_UPDATER_TEST_REPLACE");
@@ -311,7 +313,7 @@ bool update()
bSuccess = false;
}
#elif defined(_WIN32)
- bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), 8, pArgs);
+ bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), argc, pArgs);
#endif
}
else