I have a simple function printing byte a byte the value of a bytes16 0x20010db8000000000000000000000001 and I get the following result.
['0x20', '0x01', '0x0d', '0xb7', '0xff', '0xff', '0xff', '0x65' ]
[ '0x20', '0x7e', '0x22', '0x36', '0x66', '0xc0', '0x00', '0x00' ]
It should not be??
['0x20', '0x01', '0x0d', '0xb8', '0x00', '0x00', '0x00', '0x00' ]
[ '0x00', '0x00', '0x00', '0x00', '0x00', '0x00', '0x00', '0x01' ]
Why it is not??
Here the code:
function print1(bytes16 a) public
returns (bytes1,bytes1,bytes1,bytes1,bytes1,bytes1,bytes1,bytes1){
return (a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);}
function print2(bytes16 a) public returns
(bytes1,bytes1,bytes1,bytes1,bytes1,bytes1,bytes1,bytes1){
return (a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);}
Step to reproduce:
print1(0x20010db8000000000000000000000001);
print2(0x20010db8000000000000000000000001);