Skip to content

Commit 9545edb

Browse files
committed
avm2: Fix getChildByName to be case sensitive (close #19765)
1 parent 67f0460 commit 9545edb

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

core/src/avm2/globals/flash/display/display_object_container.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub fn get_child_by_name<'gc>(
169169
.and_then(|this| this.as_container())
170170
{
171171
let name = args.get_string(activation, 0)?;
172-
if let Some(child) = dobj.child_by_name(&name, false) {
172+
if let Some(child) = dobj.child_by_name(&name, true) {
173173
return Ok(child.object2());
174174
} else {
175175
return Ok(Value::Null);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//this.getChildByName("child_CLIP")
2+
null
3+
//this.addChild(newChild)
4+
//this.getChildByName("new_CHILD")
5+
null
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
num_frames = 1

0 commit comments

Comments
 (0)