mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 12:53:37 +00:00
dpnet: Fix short buffer check also for the A case.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
53bd74489d
commit
b95cc68894
|
@ -326,10 +326,7 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLA(IDirectPlay8Address *iface
|
|||
return DPNERR_INVALIDPOINTER;
|
||||
|
||||
if(url && *length)
|
||||
{
|
||||
url[0] = '\0';
|
||||
buffer = heap_alloc(*length * sizeof(WCHAR));
|
||||
}
|
||||
|
||||
hr = IDirectPlay8Address_GetURLW(iface, buffer, length);
|
||||
if(hr == DPN_OK)
|
||||
|
|
|
@ -400,9 +400,10 @@ static void address_urlA(void)
|
|||
ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
|
||||
|
||||
bufflen2 = bufflen/2;
|
||||
memset( buffer, 0x55, sizeof(buffer) );
|
||||
hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen2);
|
||||
ok(hr == DPNERR_BUFFERTOOSMALL, "got 0x%08x\n", hr);
|
||||
ok(!strlen(buffer), "wrong length\n");
|
||||
ok(buffer[0] == 0x55, "buffer modified\n");
|
||||
|
||||
hr = IDirectPlay8Address_GetURLA(localaddr, buffer, &bufflen);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
|
Loading…
Reference in a new issue