Skip to content

Commit

Permalink
avm2: Test for namespace in E4X equality check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-McSweeney authored and Lord-McSweeney committed Sep 4, 2024
1 parent 243c6b8 commit 2e4085f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/avm2/e4x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ impl<'gc> E4XNode<'gc> {
return false;
}

if self.namespace().map(|ns| ns.uri) != other.namespace().map(|ns| ns.uri) {
return false;
}

let this = self.0.read();
let other = other.0.read();

Expand Down
2 changes: 2 additions & 0 deletions tests/tests/swfs/avm2/xml_equals_namespace_check/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
true
false
Binary file not shown.
1 change: 1 addition & 0 deletions tests/tests/swfs/avm2/xml_equals_namespace_check/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
num_frames = 1

0 comments on commit 2e4085f

Please sign in to comment.