Stop the REST console crashing when entering return on an empty line
Thanks BlueWall
This commit is contained in:
Justin Clark-Casey (justincc)
2010-01-29 23:38:44 +00:00
parent 05a3e37b85
commit 627df50646

View File

@@ -82,9 +82,11 @@ namespace OpenSim.ConsoleClient
private static void SendCommand(string module, string[] cmd)
{
string sendCmd = cmd[0];
string sendCmd = "";
if (cmd.Length > 1)
{
sendCmd = cmd[0];
Array.Copy(cmd, 1, cmd, 0, cmd.Length-1);
Array.Resize(ref cmd, cmd.Length-1);
sendCmd += "\"" + String.Join("\" \"", cmd) + "\"";