Skip to content

Commit ff916e0

Browse files
SuchAFuriousDeathLord-McSweeney
authored andcommitted
avm2: Correct error text in LocalConnectionObject::run_method
1 parent b8e90be commit ff916e0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

core/src/avm2/object/local_connection_object.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,19 @@ impl<'gc> LocalConnectionObject<'gc> {
141141
Some(error) => {
142142
let event_name = istr!("asyncError");
143143
let async_error_event_cls = activation.avm2().classes().asyncerrorevent;
144+
145+
let text = AvmString::new_utf8(activation.gc(), format!("Error #2095: flash.net.LocalConnection was unable to invoke callback {method_name}."));
146+
144147
let event = EventObject::from_class_and_args(
145148
&mut activation,
146149
async_error_event_cls,
147-
&[event_name.into(), false.into(), false.into(), error, error],
150+
&[
151+
event_name.into(),
152+
false.into(),
153+
false.into(),
154+
text.into(),
155+
error,
156+
],
148157
);
149158

150159
Avm2::dispatch_event(activation.context, event, (*self).into());

tests/tests/swfs/from_shumway/localconnection/test.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
num_ticks = 3
2-
known_failure = true
32

43
[image_comparisons.output]
54
tolerance = 5

0 commit comments

Comments
 (0)