Skip to content

Commit

Permalink
avm2: Throw error for missing end tag in E4X
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpie authored and torokati44 committed Jul 8, 2024
1 parent 5aeae40 commit 8768143
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/avm2/e4x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,15 @@ impl<'gc> E4XNode<'gc> {
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)
}

Expand Down

0 comments on commit 8768143

Please sign in to comment.