From 550ed7b9ec1669738d0505f2646535eff376c1c9 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 15 Apr 2008 22:56:18 +0000 Subject: * Fix mantis 975 - prim text > 255 chars --- OpenSim/Region/ClientStack/ClientView.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index f2e48cf..f065bae 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -1985,7 +1985,15 @@ namespace OpenSim.Region.ClientStack outPacket.ObjectData[0].ID = localID; outPacket.ObjectData[0].FullID = objectID; outPacket.ObjectData[0].OwnerID = ownerID; + + // Anything more than 255 will cause libsecondlife to barf + if (text.Length > 255) + { + text = text.Remove(255); + } + outPacket.ObjectData[0].Text = Helpers.StringToField(text); + outPacket.ObjectData[0].TextColor[0] = color[0]; outPacket.ObjectData[0].TextColor[1] = color[1]; outPacket.ObjectData[0].TextColor[2] = color[2]; -- cgit v1.1