avm2: `playerglobal.swf` should be valid
This commit is contained in:
parent
1f6368b946
commit
cc531ff7db
|
@ -132,12 +132,6 @@ impl<'gc> From<String> for Error<'gc> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'gc> From<crate::tag_utils::Error> for Error<'gc> {
|
||||
fn from(val: crate::tag_utils::Error) -> Error<'gc> {
|
||||
Error::RustError(val.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'gc> From<Box<dyn std::error::Error>> for Error<'gc> {
|
||||
fn from(val: Box<dyn std::error::Error>) -> Error<'gc> {
|
||||
Error::RustError(val)
|
||||
|
|
|
@ -656,9 +656,10 @@ fn load_playerglobal<'gc>(
|
|||
activation.avm2().native_method_table = native::NATIVE_METHOD_TABLE;
|
||||
activation.avm2().native_instance_allocator_table = native::NATIVE_INSTANCE_ALLOCATOR_TABLE;
|
||||
|
||||
let movie = Arc::new(SwfMovie::from_data(PLAYERGLOBAL, None, None)?);
|
||||
let movie =
|
||||
SwfMovie::from_data(PLAYERGLOBAL, None, None).expect("playerglobal.swf should be valid");
|
||||
|
||||
let slice = SwfSlice::from(movie);
|
||||
let slice = SwfSlice::from(Arc::new(movie));
|
||||
|
||||
let mut reader = slice.read_from(0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue