aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-06-28 01:29:49 +0100
committerUbitUmarov2017-06-28 01:29:49 +0100
commitb0a0163253e14514289578d31e83ce0afe9b91a3 (patch)
treeae4bbddcb7da26282fc29251213163e8e712d558
parentremove osGetAgentIP() this was not a good idea to have :( (diff)
downloadopensim-SC_OLD-b0a0163253e14514289578d31e83ce0afe9b91a3.zip
opensim-SC_OLD-b0a0163253e14514289578d31e83ce0afe9b91a3.tar.gz
opensim-SC_OLD-b0a0163253e14514289578d31e83ce0afe9b91a3.tar.bz2
opensim-SC_OLD-b0a0163253e14514289578d31e83ce0afe9b91a3.tar.xz
BUG FIX: change lludp hovertext utf-8 cut point. Thx djphil
-rw-r--r--OpenSim/Framework/Util.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs7
3 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index af14939..ed24452 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -2221,9 +2221,9 @@ namespace OpenSim.Framework
2221 // might have gotten an oversized array even after the string trim 2221 // might have gotten an oversized array even after the string trim
2222 byte[] data = UTF8.GetBytes(str); 2222 byte[] data = UTF8.GetBytes(str);
2223 2223
2224 if (data.Length > 256) 2224 if (data.Length > 255) //play safe
2225 { 2225 {
2226 int cut = 255; 2226 int cut = 254;
2227 if((data[cut] & 0x80 ) != 0 ) 2227 if((data[cut] & 0x80 ) != 0 )
2228 { 2228 {
2229 while(cut > 0 && (data[cut] & 0xc0) != 0xc0) 2229 while(cut > 0 && (data[cut] & 0xc0) != 0xc0)
@@ -2325,7 +2325,7 @@ namespace OpenSim.Framework
2325 2325
2326 if (data.Length > MaxLength) 2326 if (data.Length > MaxLength)
2327 { 2327 {
2328 int cut = MaxLength -1 ; 2328 int cut = MaxLength - 1 ;
2329 if((data[cut] & 0x80 ) != 0 ) 2329 if((data[cut] & 0x80 ) != 0 )
2330 { 2330 {
2331 while(cut > 0 && (data[cut] & 0xc0) != 0xc0) 2331 while(cut > 0 && (data[cut] & 0xc0) != 0xc0)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 01c1fb9..b3e68ec 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5753,7 +5753,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5753 //update.JointPivot = Vector3.Zero; 5753 //update.JointPivot = Vector3.Zero;
5754 //update.JointType = 0; 5754 //update.JointType = 0;
5755 update.Material = part.Material; 5755 update.Material = part.Material;
5756 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
5757/* 5756/*
5758 if (data.ParentGroup.IsAttachment) 5757 if (data.ParentGroup.IsAttachment)
5759 { 5758 {
@@ -5832,8 +5831,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5832 update.TextureAnim = part.TextureAnimation ?? Utils.EmptyBytes; 5831 update.TextureAnim = part.TextureAnimation ?? Utils.EmptyBytes;
5833 update.TextureEntry = part.Shape.TextureEntry ?? Utils.EmptyBytes; 5832 update.TextureEntry = part.Shape.TextureEntry ?? Utils.EmptyBytes;
5834 update.Scale = part.Shape.Scale; 5833 update.Scale = part.Shape.Scale;
5835 update.Text = Util.StringToBytes256(part.Text); 5834 update.Text = Util.StringToBytes(part.Text, 255);
5836 update.MediaURL = Util.StringToBytes256(part.MediaUrl); 5835 update.MediaURL = Util.StringToBytes(part.MediaUrl, 255);
5837 5836
5838 #region PrimFlags 5837 #region PrimFlags
5839 5838
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index c2eac24..f9699b1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1103,8 +1103,8 @@ namespace OpenSim.Region.Framework.Scenes
1103 { 1103 {
1104 get 1104 get
1105 { 1105 {
1106 if (m_text.Length > 255) 1106 if (m_text.Length > 256) // yes > 254
1107 return m_text.Substring(0, 254); 1107 return m_text.Substring(0, 256);
1108 return m_text; 1108 return m_text;
1109 } 1109 }
1110 set { m_text = value; } 1110 set { m_text = value; }
@@ -1379,7 +1379,8 @@ namespace OpenSim.Region.Framework.Scenes
1379 public UUID LastOwnerID 1379 public UUID LastOwnerID
1380 { 1380 {
1381 get { return _lastOwnerID; } 1381 get { return _lastOwnerID; }
1382 set { _lastOwnerID = value; } 1382 set {
1383 _lastOwnerID = value; }
1383 } 1384 }
1384 1385
1385 public UUID RezzerID 1386 public UUID RezzerID