From 18aa58c63bc1551ab179ac4d4b3f1541d7c1837a Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Wed, 16 Jul 2008 01:19:32 +0000 Subject: [PATCH] Fix issue 1582. The maximum allowable length for a string passed to SimChat is 1500. If it was longer than 1500, it was being truncated to 1501 characters. This caused an exception and prevented the errors from reaching the console and the user in-world. --- OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index ed20cd2919..42d9bf8f0e 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // DISPLAY ERROR INWORLD string text = "Error compiling script:\r\n" + e.Message.ToString(); if (text.Length > 1500) - text = text.Substring(0, 1500); + text = text.Substring(0, 1499); // 0-1499 is 1500 characters World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); }