From bf7c17737bc5861f93e737575e0e77c6fc3af1e0 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Thu, 3 Aug 2023 15:01:25 +0200 Subject: [PATCH] avm2: Trim the start of processing instruction values --- core/src/avm2/e4x.rs | 2 +- tests/tests/swfs/from_avmplus/e4x/XML/e13_4_4_28/test.toml | 1 - tests/tests/swfs/from_avmplus/e4x/XMLList/e13_5_4_17/test.toml | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/avm2/e4x.rs b/core/src/avm2/e4x.rs index 12322af89..664bec109 100644 --- a/core/src/avm2/e4x.rs +++ b/core/src/avm2/e4x.rs @@ -469,7 +469,7 @@ impl<'gc> E4XNode<'gc> { ), AvmString::new_utf8_bytes( activation.context.gc_context, - value.as_bytes(), + value.trim_start().as_bytes(), ), ) } else { diff --git a/tests/tests/swfs/from_avmplus/e4x/XML/e13_4_4_28/test.toml b/tests/tests/swfs/from_avmplus/e4x/XML/e13_4_4_28/test.toml index 29f3cef79..cf6123969 100644 --- a/tests/tests/swfs/from_avmplus/e4x/XML/e13_4_4_28/test.toml +++ b/tests/tests/swfs/from_avmplus/e4x/XML/e13_4_4_28/test.toml @@ -1,2 +1 @@ num_ticks = 1 -known_failure = true diff --git a/tests/tests/swfs/from_avmplus/e4x/XMLList/e13_5_4_17/test.toml b/tests/tests/swfs/from_avmplus/e4x/XMLList/e13_5_4_17/test.toml index 29f3cef79..cf6123969 100644 --- a/tests/tests/swfs/from_avmplus/e4x/XMLList/e13_5_4_17/test.toml +++ b/tests/tests/swfs/from_avmplus/e4x/XMLList/e13_5_4_17/test.toml @@ -1,2 +1 @@ num_ticks = 1 -known_failure = true