From f13a48fe1cb47419c9ef40a721ca956b0be40f61 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 2 Sep 2008 06:43:16 +0000 Subject: Fix regex for string->int cast to accept leading spaces and a sign --- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 23177e5..3e63808 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -1394,7 +1394,7 @@ namespace OpenSim.Region.ScriptEngine.Shared static public explicit operator LSLInteger(string s) { - Regex r = new Regex("^[0-9][0-9]*"); + Regex r = new Regex("^[ ]*-?[0-9][0-9]*"); Match m = r.Match(s); string v = m.Groups[0].Value; -- cgit v1.1