File tree Expand file tree Collapse file tree
Sources/MessagePack/Decoder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,23 @@ extension _MessagePackDecoder.SingleValueContainer: SingleValueDecodingContainer
6060 length = Int ( try read ( UInt16 . self) )
6161 case 0xdb :
6262 length = Int ( try read ( UInt32 . self) )
63+
64+ // interpret bin as string
65+ case 0xc4 :
66+ length = Int ( try read ( UInt8 . self) )
67+ case 0xc5 :
68+ length = Int ( try read ( UInt16 . self) )
69+ case 0xc6 :
70+ length = Int ( try read ( UInt32 . self) )
71+
72+ // interpret array as string
73+ case 0x90 ... 0x9f :
74+ length = Int ( format - 0x90 )
75+ case 0xdc :
76+ length = Int ( try read ( UInt16 . self) )
77+ case 0xdd :
78+ length = Int ( try read ( UInt32 . self) )
79+
6380 default :
6481 let context = DecodingError . Context ( codingPath: self . codingPath, debugDescription: " Invalid format: \( format) " )
6582 throw DecodingError . typeMismatch ( Double . self, context)
You can’t perform that action at this time.
0 commit comments