avm2: Throw error for missing end tag in E4X

This commit is contained in:
Tom Schuster 2024-07-08 21:19:08 +02:00 committed by TÖRÖK Attila
parent 5aeae40bc5
commit 8768143d7e
1 changed files with 9 additions and 0 deletions

View File

@ -979,6 +979,15 @@ impl<'gc> E4XNode<'gc> {
Event::Eof => break, Event::Eof => break,
} }
} }
// Throw an error for unclosed tags.
if let Some(current_tag) = open_tags.last() {
return Err(make_error_1085(
activation,
&current_tag.local_name().unwrap().to_utf8_lossy(),
));
}
Ok(top_level) Ok(top_level)
} }