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.

0.6.0-stable
Mike Mazur 2008-07-16 01:19:32 +00:00
parent 620f7926f3
commit 18aa58c63b
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
// DISPLAY ERROR INWORLD // DISPLAY ERROR INWORLD
string text = "Error compiling script:\r\n" + e.Message.ToString(); string text = "Error compiling script:\r\n" + e.Message.ToString();
if (text.Length > 1500) 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, World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647,
m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
} }