X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fbase%2Fapplications%2Fmscutils%2Fservman%2Fstart.c;h=5251fb3b6fe3ceba65c612dd1748cf2b7f011786;hp=c73c1a6544e20075ea35fe0c031ec2728f6ffdfb;hb=f83d61cce0fa130fd6bcd78140502d2186dc5168;hpb=ceaed9f1ec7c3fe2aba948cafe808a50f7321213 diff --git a/reactos/base/applications/mscutils/servman/start.c b/reactos/base/applications/mscutils/servman/start.c index c73c1a6544e..5251fb3b6fe 100644 --- a/reactos/base/applications/mscutils/servman/start.c +++ b/reactos/base/applications/mscutils/servman/start.c @@ -53,16 +53,16 @@ DoStartService(LPWSTR ServiceName, lpChar++; } - /* Allocate the arguments vector and add one for the service name */ - lpArgsVector = LocalAlloc(LMEM_FIXED, (dwArgsCount + 1) * sizeof(LPCWSTR)); + /* + * Allocate the arguments vector. + * Do not add the service name here because services.exe does it for us! + */ + lpArgsVector = LocalAlloc(LMEM_FIXED, dwArgsCount * sizeof(LPCWSTR)); if (!lpArgsVector) return FALSE; - /* Make the service name the first argument */ - lpArgsVector[0] = ServiceName; - /* Fill the arguments vector */ - dwArgsCount = 1; + dwArgsCount = 0; bWhiteSpace = TRUE; lpChar = lpStartParams; while (*lpChar != 0)