mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-28 22:48:18 +03:00
lsteamclient: Handle error result in networking_message_pool_receive_().
CW-Bug-Id: #24177
This commit is contained in:
parent
3ca6b6d944
commit
6a160b9d0a
@ -88,6 +88,8 @@ static BOOL networking_message_pool_receive_144( int32_t capacity, int32_t count
|
|||||||
struct networking_message_pool *pool = CONTAINING_RECORD( messages[0], struct networking_message, w_msg_144 )->pool;
|
struct networking_message_pool *pool = CONTAINING_RECORD( messages[0], struct networking_message, w_msg_144 )->pool;
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
|
||||||
|
if (count < 0) count = 0;
|
||||||
|
|
||||||
for (i = count; i < capacity; i++)
|
for (i = count; i < capacity; i++)
|
||||||
{
|
{
|
||||||
messages[i]->m_pfnRelease( messages[i] );
|
messages[i]->m_pfnRelease( messages[i] );
|
||||||
@ -155,11 +157,13 @@ static BOOL networking_message_pool_create_147( uint32_t count, w_SteamNetworkin
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL networking_message_pool_receive_147( uint32_t capacity, uint32_t count, w_SteamNetworkingMessage_t_147 **messages )
|
static BOOL networking_message_pool_receive_147( uint32_t capacity, int32_t count, w_SteamNetworkingMessage_t_147 **messages )
|
||||||
{
|
{
|
||||||
struct networking_message_pool *pool = CONTAINING_RECORD( messages[0], struct networking_message, w_msg_147 )->pool;
|
struct networking_message_pool *pool = CONTAINING_RECORD( messages[0], struct networking_message, w_msg_147 )->pool;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
|
if (count < 0) count = 0;
|
||||||
|
|
||||||
for (i = count; i < capacity; i++)
|
for (i = count; i < capacity; i++)
|
||||||
{
|
{
|
||||||
messages[i]->m_pfnRelease( messages[i] );
|
messages[i]->m_pfnRelease( messages[i] );
|
||||||
@ -227,11 +231,13 @@ static BOOL networking_message_pool_create_153a( uint32_t count, w_SteamNetworki
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL networking_message_pool_receive_153a( uint32_t capacity, uint32_t count, w_SteamNetworkingMessage_t_153a **messages )
|
static BOOL networking_message_pool_receive_153a( uint32_t capacity, int32_t count, w_SteamNetworkingMessage_t_153a **messages )
|
||||||
{
|
{
|
||||||
struct networking_message_pool *pool = CONTAINING_RECORD( messages[0], struct networking_message, w_msg_153a )->pool;
|
struct networking_message_pool *pool = CONTAINING_RECORD( messages[0], struct networking_message, w_msg_153a )->pool;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
|
if (count < 0) count = 0;
|
||||||
|
|
||||||
for (i = count; i < capacity; i++)
|
for (i = count; i < capacity; i++)
|
||||||
{
|
{
|
||||||
messages[i]->m_pfnRelease( messages[i] );
|
messages[i]->m_pfnRelease( messages[i] );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user