From 129cc49eb4d2f43cdda3804447f84bd3df397ff1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 11 Mar 2015 22:42:14 +0000 Subject: Allow a console command to give blank arguments ("") without the parser failing, e.g. login text "" Relates to http://opensimulator.org/mantis/view.php?id=7489 --- OpenSim/Framework/Console/CommandConsole.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 0f68afe..23a2cc8 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -433,6 +433,10 @@ namespace OpenSim.Framework.Console foreach (string s in cmd) { + // If a user puts an empty string on the console then this cannot be part of the command. + if (s == "") + break; + index++; List found = new List(); @@ -443,9 +447,8 @@ namespace OpenSim.Framework.Console { found.Clear(); found.Add(opt); - break; } - if (opt.StartsWith(s)) + else if (opt.StartsWith(s)) { found.Add(opt); } -- cgit v1.1