summaryrefslogtreecommitdiff
path: root/indra/llcommon/lleventdispatcher.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-01-10 17:38:01 -0500
committerNat Goodspeed <nat@lindenlab.com>2023-07-13 12:49:08 -0400
commit9553965ad661b2753d13fa9b414f529ad440000f (patch)
treee0b321c01b25bd01675902b1900282604c044ecd /indra/llcommon/lleventdispatcher.cpp
parentb2205bde52acf82575757f74a642c40b7433bf6b (diff)
DRTVWR-558: Add tests for LLDispatchListener functionality.
Refine the special case of calling a nullary target function from an (event) method, notably via LLDispatchListener. (cherry picked from commit edcc52a9f60b1ec9b8f53603d6e2676558d41294)
Diffstat (limited to 'indra/llcommon/lleventdispatcher.cpp')
-rw-r--r--indra/llcommon/lleventdispatcher.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llcommon/lleventdispatcher.cpp b/indra/llcommon/lleventdispatcher.cpp
index 7e5723c503..7abdc8f57a 100644
--- a/indra/llcommon/lleventdispatcher.cpp
+++ b/indra/llcommon/lleventdispatcher.cpp
@@ -461,7 +461,13 @@ struct LLEventDispatcher::ArrayParamsDispatchEntry: public LLEventDispatcher::Pa
LLSD args{ event };
if (fromMap)
{
- if (mArity)
+ if (! mArity)
+ {
+ // When the target function is nullary, and we're called from
+ // an (event) method, just ignore the rest of the map entries.
+ args.clear();
+ }
+ else
{
// We only require/retrieve argskey if the target function
// isn't nullary. For all others, since we require an LLSD