From 43f4eca67cb08fea911cb456b9301d6b74a5892c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 Jan 2019 21:49:38 +0000 Subject: [PATCH] mantis 8447: empty buttons list in llDialog now shows Ok button --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c757cd088f..22443a9f80 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -8135,10 +8135,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int length = buttons.Length; if (length < 1) { - Error("llDialog", "At least 1 button must be shown"); - return; + buttons.Add(new LSL_String("Ok")); + length = 1; } - if (length > 12) + else if (length > 12) { Error("llDialog", "No more than 12 buttons can be shown"); return;