mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
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)
This commit is contained in:
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user