mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Fix regex for string->int cast to accept leading spaces and a sign
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user