BinaryCoder icon indicating copy to clipboard operation
BinaryCoder copied to clipboard

Improper decoding of binary arrays.

Open jdberry opened this issue 3 years ago • 0 comments

In the Array.init(fromBinary:) extension, the array elements should likewise be initialized with init(fromBinary:), not init(from:) as in the code. As it is, array elements are decoded by the implicit decoder but not by explicit binary decoders.

This:

let decoded = try binaryElement.init(from: decoder)

should be:

let decoded = try binaryElement.init(fromBinary: decoder)

jdberry avatar Oct 28 '21 16:10 jdberry