File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,10 @@ where
146146 Amf0Marker :: String | Amf0Marker :: LongString | Amf0Marker :: XmlDocument => {
147147 self . decode_string ( ) ?. into_deserializer ( ) . deserialize_any ( visitor)
148148 }
149- Amf0Marker :: Null | Amf0Marker :: Undefined => visitor. visit_unit ( ) ,
149+ Amf0Marker :: Null | Amf0Marker :: Undefined => {
150+ self . decode_null ( ) ?;
151+ visitor. visit_unit ( )
152+ } ,
150153 Amf0Marker :: Object | Amf0Marker :: TypedObject | Amf0Marker :: EcmaArray => {
151154 let header = self . decode_object_header ( ) ?;
152155 match header {
Original file line number Diff line number Diff line change @@ -112,7 +112,10 @@ where
112112 }
113113
114114 pub ( crate ) fn encode_object_trailer ( & mut self ) -> Result < ( ) , Amf0Error > {
115- self . writer . write_u24 :: < BigEndian > ( Amf0Marker :: ObjectEnd as u32 ) ?;
115+ // Final object key length is 0
116+ self . writer . write_u16 :: < BigEndian > ( 0 ) ?;
117+ // Followed by object end
118+ self . writer . write_u8 ( Amf0Marker :: ObjectEnd as u8 ) ?;
116119 Ok ( ( ) )
117120 }
118121
You can’t perform that action at this time.
0 commit comments