diff options
author | Oren Hurvitz | 2014-08-06 19:02:15 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-08-06 19:02:15 +0300 |
commit | e36e416637f35de76079989b59eb37fc4bb091de (patch) | |
tree | fa06b02ea25ba655f34da4524f9398e1d04d06da /OpenSim/Region/Framework | |
parent | Add RootPositionUpdateTolerance, RootRotationUpdateTolerance, and RootVelocit... (diff) | |
download | opensim-SC_OLD-e36e416637f35de76079989b59eb37fc4bb091de.zip opensim-SC_OLD-e36e416637f35de76079989b59eb37fc4bb091de.tar.gz opensim-SC_OLD-e36e416637f35de76079989b59eb37fc4bb091de.tar.bz2 opensim-SC_OLD-e36e416637f35de76079989b59eb37fc4bb091de.tar.xz |
Fixed crash when using Allowed/Denied Viewers, and the viewer's name is shorter than one of the test strings
This fixes http://opensimulator.org/mantis/view.php?id=7294
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8268235..082eea5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3525,7 +3525,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3525 | { | 3525 | { |
3526 | foreach (string viewer in m_AllowedViewers) | 3526 | foreach (string viewer in m_AllowedViewers) |
3527 | { | 3527 | { |
3528 | if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower()) | 3528 | if (viewer == curViewer.Substring(0, Math.Min(viewer.Length, curViewer.Length)).Trim().ToLower()) |
3529 | { | 3529 | { |
3530 | ViewerDenied = false; | 3530 | ViewerDenied = false; |
3531 | break; | 3531 | break; |
@@ -3542,7 +3542,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3542 | { | 3542 | { |
3543 | foreach (string viewer in m_BannedViewers) | 3543 | foreach (string viewer in m_BannedViewers) |
3544 | { | 3544 | { |
3545 | if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower()) | 3545 | if (viewer == curViewer.Substring(0, Math.Min(viewer.Length, curViewer.Length)).Trim().ToLower()) |
3546 | { | 3546 | { |
3547 | ViewerDenied = true; | 3547 | ViewerDenied = true; |
3548 | break; | 3548 | break; |