I don't know if this is a quirk in the remix IDE or something solidity does itself, but I've found something interesting and would like to know why it occurs.
I have a struct x in a contract Y which has two fields:
Struct X {
address owner;
address renter;
}
Now, when I initialize the struct by calling the function createX() in the remix IDE:
function createX() public {
X storage x;
x.owner = msg.sender;
}
The renter address field gets the value of the contract address Y
Why does this happen? I expected the field to equal the zero address.