mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
BUG FIX: change lludp hovertext utf-8 cut point. Thx djphil
This commit is contained in:
@@ -2221,9 +2221,9 @@ namespace OpenSim.Framework
|
||||
// might have gotten an oversized array even after the string trim
|
||||
byte[] data = UTF8.GetBytes(str);
|
||||
|
||||
if (data.Length > 256)
|
||||
if (data.Length > 255) //play safe
|
||||
{
|
||||
int cut = 255;
|
||||
int cut = 254;
|
||||
if((data[cut] & 0x80 ) != 0 )
|
||||
{
|
||||
while(cut > 0 && (data[cut] & 0xc0) != 0xc0)
|
||||
@@ -2325,7 +2325,7 @@ namespace OpenSim.Framework
|
||||
|
||||
if (data.Length > MaxLength)
|
||||
{
|
||||
int cut = MaxLength -1 ;
|
||||
int cut = MaxLength - 1 ;
|
||||
if((data[cut] & 0x80 ) != 0 )
|
||||
{
|
||||
while(cut > 0 && (data[cut] & 0xc0) != 0xc0)
|
||||
|
||||
Reference in New Issue
Block a user