From 6a9f4b665a6afd6381bd8f116c5a63ceccd55eb1 Mon Sep 17 00:00:00 2001 From: Lord-McSweeney Date: Thu, 12 Sep 2024 22:37:50 -0700 Subject: [PATCH] avm2: Add warning comment to `handle_input_multiname` --- core/src/avm2/object/xml_object.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/avm2/object/xml_object.rs b/core/src/avm2/object/xml_object.rs index 279425e8b..736c7b5ff 100644 --- a/core/src/avm2/object/xml_object.rs +++ b/core/src/avm2/object/xml_object.rs @@ -720,6 +720,9 @@ fn handle_input_multiname<'gc>( ) -> Multiname<'gc> { // Special case to handle code like: xml["@attr"] // FIXME: Figure out the exact semantics. + // NOTE: It is very important the code within the if-statement is not run + // when the passed name has the Any namespace. Otherwise, we run the risk of + // creating a NamespaceSet::Multiple with an Any namespace in it. if !name.has_explicit_namespace() && !name.is_attribute() && !name.is_any_name()