From 87f328bd30bf327774becca51610588462c0953a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 10 Feb 2009 14:39:04 +0000 Subject: [PATCH] Change the command parser and resolver to be able to disambiguate commands that are a prefix of another command. Fixes "terrain load" Fixes Mantis #3123 --- OpenSim/Framework/Console/ConsoleBase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index e98944cc6f..8e61587e97 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -238,6 +238,12 @@ namespace OpenSim.Framework.Console foreach (string opt in current.Keys) { + if (remaining > 0 && opt == s) + { + found.Clear(); + found.Add(opt); + break; + } if (opt.StartsWith(s)) { found.Add(opt); @@ -301,6 +307,12 @@ namespace OpenSim.Framework.Console foreach (string opt in current.Keys) { + if (opt == s) + { + found.Clear(); + found.Add(opt); + break; + } if (opt.StartsWith(s)) { found.Add(opt);