Skip to content

Commit 8768143

Browse files
evilpietorokati44
authored andcommitted
avm2: Throw error for missing end tag in E4X
1 parent 5aeae40 commit 8768143

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/src/avm2/e4x.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,15 @@ impl<'gc> E4XNode<'gc> {
979979
Event::Eof => break,
980980
}
981981
}
982+
983+
// Throw an error for unclosed tags.
984+
if let Some(current_tag) = open_tags.last() {
985+
return Err(make_error_1085(
986+
activation,
987+
&current_tag.local_name().unwrap().to_utf8_lossy(),
988+
));
989+
}
990+
982991
Ok(top_level)
983992
}
984993

0 commit comments

Comments
 (0)