Copy the full key pair address, to support parameters which have more than > 2^16 leaves in an individual tree. This will now always copy the 4 bytes, which has a barely noticeable performance impact.
Fixes an undefined behavior if a single tree (d=1) is used, leading to a right shift of 64-bit values by 64.
The other fields are still only copied partially (it seems unlikely they will ever exceed the boundaries, but for correctness we maybe should consider it):
Chain address would only be > 1 byte if W <= 2.
Hash address would only be > 1 byte if W > 8 [this may happen, but would lead to very slow parameters].
Tree height would only be > 1 byte if h/d >=256 or similar if the FORS tree would be >= 256 layers (which will never happen).
This includes two changes:
The other fields are still only copied partially (it seems unlikely they will ever exceed the boundaries, but for correctness we maybe should consider it):