From 59d0e3c3c851f3c7de8c47350226c077bbb440b5 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Mon, 31 Mar 2014 15:49:53 -0400 Subject: [PATCH] Add check to prevent the return of a wrong value when key is NULL_KEY --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 427800273c..86509aaef9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5173,8 +5173,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // so the OR check may be a little redundant, but it's being done // for completion and should LSL_Key ever be implemented // as it's own struct + // NOTE: 3rd case is needed because a NULL_KEY comes through as + // type 'obj' and wrongly returns "" else if (!(src.Data[index] is LSL_String || - src.Data[index] is LSL_Key)) + src.Data[index] is LSL_Key || + src.Data[index] == "00000000-0000-0000-0000-000000000000")) { return ""; }