diff options
author | BlueWall | 2014-03-31 15:49:53 -0400 |
---|---|---|
committer | BlueWall | 2014-03-31 15:49:53 -0400 |
commit | 59d0e3c3c851f3c7de8c47350226c077bbb440b5 (patch) | |
tree | ceb3769dc74a6c889f81e894afc6e6b261ea4131 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Profiles local StorageProvider fix, round 3 (diff) | |
download | opensim-SC-59d0e3c3c851f3c7de8c47350226c077bbb440b5.zip opensim-SC-59d0e3c3c851f3c7de8c47350226c077bbb440b5.tar.gz opensim-SC-59d0e3c3c851f3c7de8c47350226c077bbb440b5.tar.bz2 opensim-SC-59d0e3c3c851f3c7de8c47350226c077bbb440b5.tar.xz |
Add check to prevent the return of a wrong value when key is NULL_KEY
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4278002..86509aa 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 | |||
5173 | // so the OR check may be a little redundant, but it's being done | 5173 | // so the OR check may be a little redundant, but it's being done |
5174 | // for completion and should LSL_Key ever be implemented | 5174 | // for completion and should LSL_Key ever be implemented |
5175 | // as it's own struct | 5175 | // as it's own struct |
5176 | // NOTE: 3rd case is needed because a NULL_KEY comes through as | ||
5177 | // type 'obj' and wrongly returns "" | ||
5176 | else if (!(src.Data[index] is LSL_String || | 5178 | else if (!(src.Data[index] is LSL_String || |
5177 | src.Data[index] is LSL_Key)) | 5179 | src.Data[index] is LSL_Key || |
5180 | src.Data[index] == "00000000-0000-0000-0000-000000000000")) | ||
5178 | { | 5181 | { |
5179 | return ""; | 5182 | return ""; |
5180 | } | 5183 | } |