aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 34a72c9..8154c4f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5077,9 +5077,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5077 { 5077 {
5078 Error("llTextBox", "Empty message"); 5078 Error("llTextBox", "Empty message");
5079 } 5079 }
5080 else if (message.Length > 512) 5080 else if (Encoding.UTF8.GetByteCount(message) > 512)
5081 { 5081 {
5082 Error("llTextBox", "Message more than 512 characters"); 5082 Error("llTextBox", "Message longer than 512 bytes");
5083 } 5083 }
5084 else 5084 else
5085 { 5085 {
@@ -7908,6 +7908,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7908 return; 7908 return;
7909 } 7909 }
7910 7910
7911 if (message == string.Empty)
7912 {
7913 Error("llDialog", "Empty message");
7914 }
7915 else if (Encoding.UTF8.GetByteCount(message) > 512)
7916 {
7917 Error("llDialog", "Message longer than 512 bytes");
7918 }
7919
7911 string[] buts = new string[length]; 7920 string[] buts = new string[length];
7912 for (int i = 0; i < length; i++) 7921 for (int i = 0; i < length; i++)
7913 { 7922 {