fix/add lldialog and llTextBox message size error checks, aborting if error as spec. (we can change this to silent truncate and execute the larger ones since llUdp now does it. But doing as spec now)
parent
38aad774f7
commit
b6c3592411
|
@ -5077,9 +5077,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
Error("llTextBox", "Empty message");
|
||||
}
|
||||
else if (message.Length > 512)
|
||||
else if (Encoding.UTF8.GetByteCount(message) > 512)
|
||||
{
|
||||
Error("llTextBox", "Message more than 512 characters");
|
||||
Error("llTextBox", "Message longer than 512 bytes");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7908,6 +7908,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return;
|
||||
}
|
||||
|
||||
if (message == string.Empty)
|
||||
{
|
||||
Error("llDialog", "Empty message");
|
||||
}
|
||||
else if (Encoding.UTF8.GetByteCount(message) > 512)
|
||||
{
|
||||
Error("llDialog", "Message longer than 512 bytes");
|
||||
}
|
||||
|
||||
string[] buts = new string[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue