BinUtils icon indicating copy to clipboard operation
BinUtils copied to clipboard

packing of UInt16 not working

Open tcurdt opened this issue 6 years ago • 0 comments

        let foo : UInt16 = 0
        let d = pack(">H", [ foo ])
        print(d)

gives at

            case "H":
                bytes = UInt16(truncatingBitPattern:o as! Int).data.bytes
Could not cast value of type 'Swift.UInt16' (0x110c130a0) to 'Swift.Int' (0x110c13618).

tcurdt avatar Sep 01 '17 12:09 tcurdt