Fixed: Don't append empty login, password or shard ID to batch

This commit is contained in:
kervala 2016-02-23 16:58:57 +01:00
parent c70095d428
commit d3f031f3ee

View file

@ -1029,12 +1029,20 @@ void CPatchManager::executeBatchFile()
arguments += "\"" + RyzomFilename + "\" \"" + ClientPatchPath + "\" " + ClientRootPath + "\"";
#endif
// append login and password
arguments += " " + LoginLogin + " " + LoginPassword;
if (!r2Mode)
// append login, password and shard
if (!LoginLogin.empty())
{
arguments += " " + toString(LoginShardId);
arguments += " " + LoginLogin;
if (!LoginPassword.empty())
{
arguments += " " + LoginPassword;
if (!r2Mode)
{
arguments += " " + toString(LoginShardId);
}
}
}
if (!launchProgram(batchFilename, arguments, false))