diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-13 09:58:29 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2023-12-13 16:31:53 +0100 |
commit | c358da05eb2a588b1bdf2fba96cc38f6f1e2221e (patch) | |
tree | 59b81b301f096b2c28d00119ee53819cad68d103 /desktop | |
parent | 94d18ea557a03c1f2d450454908787f7d3af8a6e (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>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/updater.cxx | 8 |
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 |