Skip to content

Commit f01c77e

Browse files
avm2: Return correct error for unclosed tags
1 parent 102b5e7 commit f01c77e

File tree

2 files changed

+8
-2
lines changed
  • core/src/avm2
  • tests/tests/swfs/from_avmplus/as3/RuntimeErrors/Error1095XmlUnterminatedAttr

2 files changed

+8
-2
lines changed

core/src/avm2/e4x.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,19 @@ fn make_xml_error<'gc>(activation: &mut Activation<'_, 'gc>, err: XmlError) -> E
7777
"Error #1094: XML parser failure: Unterminated comment.",
7878
1094,
7979
),
80+
// FIXME: Based on circumstance, this branch should produce Error #1092 or Error #1097.
81+
// Doing so should fix the from_avmplus/as3/RuntimeErrors/Error1092XmlUnterminatedXmlDecl test.
8082
XmlSyntaxError::UnclosedPIOrXmlDecl => type_error(
8183
activation,
8284
"Error #1097: XML parser failure: Unterminated processing instruction.",
8385
1097,
8486
),
85-
_ => type_error(
87+
XmlSyntaxError::UnclosedTag => type_error(
88+
activation,
89+
"Error #1095: XML parser failure: Unterminated attribute.",
90+
1095,
91+
),
92+
XmlSyntaxError::InvalidBangMarkup => type_error(
8693
activation,
8794
"Error #1090: XML parser failure: element is malformed.",
8895
1090,
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
num_ticks = 1
2-
known_failure = true

0 commit comments

Comments
 (0)