From d194f21a5dbca5b156fc89572ce286e8af00d294 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 23 Apr 2008 18:41:39 +0000 Subject: [PATCH] * Fix a console issue where pressing return on some operating systems cause the console to crash and complain about 0 regex matches. --- OpenSim/Framework/Console/ConsoleBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 1d92ed1d07..f6d8ebd592 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -376,6 +376,10 @@ namespace OpenSim.Framework.Console char[] delims = {' ', '"'}; MatchCollection matches = Extractor.Matches(cmdline); // Get matches + + if (matches.Count == 0) + return; + string cmd = matches[0].Value.Trim(delims); string[] cmdparams = new string[matches.Count - 1];