summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-05-31 16:36:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 16:05:09 -0400
commite6a9523d2753da50b164c5a7b08ab80ae79179b9 (patch)
tree67a015b709e9f7b7f8d57fcdbe926480f25e1b62 /indra
parent378e4fae94c9c16b0b9070d7c7d3f63cba8aee94 (diff)
SL-11216: Allow llsd::drill() to accept LLSD() as (empty) path.
Before this change, you had to literally pass LLSD::emptyArray() to get no-op behavior.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsdutil.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index ad27f19e85..ec883130bd 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -691,9 +691,10 @@ namespace llsd
LLSD& drill(LLSD& blob, const LLSD& rawPath)
{
// Treat rawPath uniformly as an array. If it's not already an array,
- // store it as the only entry in one.
+ // store it as the only entry in one. (But let's say Undefined means an
+ // empty array.)
LLSD path;
- if (rawPath.isArray())
+ if (rawPath.isArray() || rawPath.isUndefined())
{
path = rawPath;
}