winio: fix array splat
Hi,
This fixes two issues with unsafeCopyFromBuffer
:
- the bounds check should be exclusive not inclusive. This is causing it to bottom out when it shouldn't.
- memcpy takes number of bytes to copy, not number of elements.
Without these changes the function is incorrect and results in corrupted I/O records.
Ok for master and GHC 9?