Stop the REST console crashing when entering return on an empty line
Thanks BlueWall
mysql-performance
Justin Clark-Casey (justincc) 2010-01-29 23:38:44 +00:00
parent 05a3e37b85
commit 627df50646
1 changed files with 3 additions and 1 deletions

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) + "\"";