summaryrefslogtreecommitdiff
path: root/sal/osl/w32/process.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/osl/w32/process.cxx')
-rw-r--r--sal/osl/w32/process.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 920e77dfa6a2..6d55249d85db 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -261,14 +261,14 @@ static struct CommandArgs_Impl g_command_args =
#endif
static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **)
{
+ int nArgs(0);
+ LPWSTR *wargv = CommandLineToArgvW( GetCommandLineW(), &nArgs );
+ assert(argc == nArgs || argc == 0 /* special case - faked */);
rtl_uString ** ppArgs =
- (rtl_uString**)rtl_allocateZeroMemory (argc * sizeof(rtl_uString*));
+ (rtl_uString**)rtl_allocateZeroMemory(nArgs * sizeof(rtl_uString*));
if (ppArgs != 0)
{
int i;
- int nArgs;
- LPWSTR *wargv = CommandLineToArgvW( GetCommandLineW(), &nArgs );
- OSL_ASSERT( nArgs == argc );
for (i = 0; i < nArgs; i++)
{
/* Convert to unicode */