On 03.03.2015 11:57, Alistair Leslie-Hughes wrote:
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, &localhost, sizeof(localhost)+2, DPNA_DATATYPE_STRING);
ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
What happens with size == sizeof(localhost)/2 (or any size that cuts off a string)? Does it make a partial copy?
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_HOSTNAME, "testing", 8+2, DPNA_DATATYPE_STRING_ANSI);
ok(hr == DPNERR_INVALIDPARAM, "got 0x%08x\n", hr);
Please use sizeof() here too.