aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-05 20:34:34 +0000
committerJustin Clarke Casey2008-08-05 20:34:34 +0000
commit6b1a5c33af384d5e42175dae19bb46ae48a0c717 (patch)
tree3ec992139e1126a7226edba81c09efa8c459a19c
parent* Add / as a shortcut to select the root region (diff)
downloadopensim-SC-6b1a5c33af384d5e42175dae19bb46ae48a0c717.zip
opensim-SC-6b1a5c33af384d5e42175dae19bb46ae48a0c717.tar.gz
opensim-SC-6b1a5c33af384d5e42175dae19bb46ae48a0c717.tar.bz2
opensim-SC-6b1a5c33af384d5e42175dae19bb46ae48a0c717.tar.xz
* Fix probable cause of one of the bugs seen in the osgrid office hours today
* If a text string is too long we actually need to truncate to 254 chars rather than 255, since the Helpers.StringToField conversion will stick a \0 on the end
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 4e9b1ae..93cb890 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2287,10 +2287,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2287 outPacket.ObjectData[0].FullID = objectID; 2287 outPacket.ObjectData[0].FullID = objectID;
2288 outPacket.ObjectData[0].OwnerID = ownerID; 2288 outPacket.ObjectData[0].OwnerID = ownerID;
2289 2289
2290 // Anything more than 255 will cause libsecondlife to barf 2290 // Anything more than 254 will cause libsecondlife to barf
2291 if (text.Length > 255) 2291 // (libsl 1550) adds an \0 on the Helpers.StringToField conversion if it isn't present
2292 if (text.Length > 254)
2292 { 2293 {
2293 text = text.Remove(255); 2294 text = text.Remove(254);
2294 } 2295 }
2295 2296
2296 outPacket.ObjectData[0].Text = Helpers.StringToField(text); 2297 outPacket.ObjectData[0].Text = Helpers.StringToField(text);