aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console/CommandConsole.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-03-11 22:42:14 +0000
committerJustin Clark-Casey (justincc)2015-03-11 22:42:14 +0000
commit129cc49eb4d2f43cdda3804447f84bd3df397ff1 (patch)
tree7be16b08ed70bf98d0de571f45ae44f93314341d /OpenSim/Framework/Console/CommandConsole.cs
parentBulletSim: add VEHICLE_ more parameter value limit checking. (diff)
downloadopensim-SC-129cc49eb4d2f43cdda3804447f84bd3df397ff1.zip
opensim-SC-129cc49eb4d2f43cdda3804447f84bd3df397ff1.tar.gz
opensim-SC-129cc49eb4d2f43cdda3804447f84bd3df397ff1.tar.bz2
opensim-SC-129cc49eb4d2f43cdda3804447f84bd3df397ff1.tar.xz
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
Diffstat (limited to 'OpenSim/Framework/Console/CommandConsole.cs')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs7
1 files changed, 5 insertions, 2 deletions
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
433 433
434 foreach (string s in cmd) 434 foreach (string s in cmd)
435 { 435 {
436 // If a user puts an empty string on the console then this cannot be part of the command.
437 if (s == "")
438 break;
439
436 index++; 440 index++;
437 441
438 List<string> found = new List<string>(); 442 List<string> found = new List<string>();
@@ -443,9 +447,8 @@ namespace OpenSim.Framework.Console
443 { 447 {
444 found.Clear(); 448 found.Clear();
445 found.Add(opt); 449 found.Add(opt);
446 break;
447 } 450 }
448 if (opt.StartsWith(s)) 451 else if (opt.StartsWith(s))
449 { 452 {
450 found.Add(opt); 453 found.Add(opt);
451 } 454 }