fix llSetText utf8 string size cliping
parent
73719b2efc
commit
d9647dbf7c
|
@ -4741,20 +4741,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
Vector3 av3 = Util.Clip(color, 0.0f, 1.0f);
|
Vector3 av3 = Util.Clip(color, 0.0f, 1.0f);
|
||||||
if (text.Length > 254)
|
|
||||||
text = text.Remove(254);
|
|
||||||
|
|
||||||
byte[] data;
|
byte[] data;
|
||||||
do
|
data = Util.StringToBytes256(text);
|
||||||
{
|
text = Util.UTF8.GetString(data);
|
||||||
data = Util.UTF8.GetBytes(text);
|
|
||||||
if (data.Length > 254)
|
|
||||||
text = text.Substring(0, text.Length - 1);
|
|
||||||
} while (data.Length > 254);
|
|
||||||
|
|
||||||
m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
|
m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
|
||||||
//m_host.ParentGroup.HasGroupChanged = true;
|
|
||||||
//m_host.ParentGroup.ScheduleGroupForFullUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Float llWater(LSL_Vector offset)
|
public LSL_Float llWater(LSL_Vector offset)
|
||||||
|
|
Loading…
Reference in New Issue