aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
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;