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 27929c6..ec6f5c2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3465,7 +3465,7 @@ namespace OpenSim.Region.Framework.Scenes
3465 { 3465 {
3466 foreach (string viewer in m_AllowedViewers) 3466 foreach (string viewer in m_AllowedViewers)
3467 { 3467 {
3468 if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower()) 3468 if (viewer == curViewer.Substring(0, Math.Min(viewer.Length, curViewer.Length)).Trim().ToLower())
3469 { 3469 {
3470 ViewerDenied = false; 3470 ViewerDenied = false;
3471 break; 3471 break;
@@ -3482,7 +3482,7 @@ namespace OpenSim.Region.Framework.Scenes
3482 { 3482 {
3483 foreach (string viewer in m_BannedViewers) 3483 foreach (string viewer in m_BannedViewers)
3484 { 3484 {
3485 if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower()) 3485 if (viewer == curViewer.Substring(0, Math.Min(viewer.Length, curViewer.Length)).Trim().ToLower())
3486 { 3486 {
3487 ViewerDenied = true; 3487 ViewerDenied = true;
3488 break; 3488 break;