diff options
author | UbitUmarov | 2017-06-28 01:29:49 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-28 01:29:49 +0100 |
commit | b0a0163253e14514289578d31e83ce0afe9b91a3 (patch) | |
tree | ae4bbddcb7da26282fc29251213163e8e712d558 /OpenSim/Framework/Util.cs | |
parent | remove osGetAgentIP() this was not a good idea to have :( (diff) | |
download | opensim-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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Util.cs | 6 |
1 files changed, 3 insertions, 3 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) |