sorry, forgot to change one var
[reactos.git] / reactos / lib / advapi32 / service / scm.c
index cc41f40..60dc0cf 100644 (file)
@@ -343,7 +343,7 @@ CreateServiceA(
         SetLastError(ERROR_NOT_ENOUGH_MEMORY);
         goto cleanup;
     }
-    MultiByteToWideChar(CP_ACP, 0, lpDependencies, -1, lpDependenciesW, len);
+    MultiByteToWideChar(CP_ACP, 0, lpDependencies, -1, lpDependenciesW, dwDependenciesLength);
 
     len = MultiByteToWideChar(CP_ACP, 0, lpServiceStartName, -1, NULL, 0);
     lpServiceStartName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));