mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
dplayx: Always set the data size in GetGroupData().
This commit is contained in:
parent
924a8e0d69
commit
434b5a148c
Notes:
Alexandre Julliard
2024-11-19 23:21:50 +01:00
Approved-by: Alistair Leslie-Hughes (@alesliehughes) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6844
2 changed files with 4 additions and 6 deletions
|
@ -3078,12 +3078,11 @@ static HRESULT WINAPI IDirectPlay4Impl_GetGroupData( IDirectPlay4 *iface, DPID g
|
||||||
src = gdata->lpRemoteData;
|
src = gdata->lpRemoteData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*size = bufsize;
|
||||||
|
|
||||||
/* Is the user requesting to know how big a buffer is required? */
|
/* Is the user requesting to know how big a buffer is required? */
|
||||||
if ( !data || *size < bufsize )
|
if ( !data || *size < bufsize )
|
||||||
{
|
|
||||||
*size = bufsize;
|
|
||||||
return DPERR_BUFFERTOOSMALL;
|
return DPERR_BUFFERTOOSMALL;
|
||||||
}
|
|
||||||
|
|
||||||
CopyMemory( data, src, bufsize );
|
CopyMemory( data, src, bufsize );
|
||||||
|
|
||||||
|
|
|
@ -2862,9 +2862,8 @@ static BOOL CALLBACK checkPlayerListCallback( DPID dpid, DWORD playerType, const
|
||||||
else
|
else
|
||||||
hr = IDirectPlayX_GetGroupData( data->dp, dpid, playerData, &playerDataSize, DPGET_REMOTE );
|
hr = IDirectPlayX_GetGroupData( data->dp, dpid, playerData, &playerDataSize, DPGET_REMOTE );
|
||||||
ok_( __FILE__, data->line )( hr == DP_OK, "GetPlayerData() returned %#lx.\n", hr );
|
ok_( __FILE__, data->line )( hr == DP_OK, "GetPlayerData() returned %#lx.\n", hr );
|
||||||
todo_wine_if( playerType == DPPLAYERTYPE_GROUP )
|
ok_( __FILE__, data->line )( playerDataSize == player->expectedPlayerDataSize,
|
||||||
ok_( __FILE__, data->line )( playerDataSize == player->expectedPlayerDataSize,
|
"got player data size %lu.\n", playerDataSize );
|
||||||
"got player data size %lu.\n", playerDataSize );
|
|
||||||
ok_( __FILE__, data->line )( !memcmp( playerData, player->expectedPlayerData, player->expectedPlayerDataSize ),
|
ok_( __FILE__, data->line )( !memcmp( playerData, player->expectedPlayerData, player->expectedPlayerDataSize ),
|
||||||
"player data doesn't match.\n" );
|
"player data doesn't match.\n" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue