mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-07-21 12:46:23 +03:00
lsteamclient: Pad some client pointers.
This commit is contained in:
parent
63ea48a0eb
commit
725044535f
@ -51,7 +51,7 @@ void queue_vtable_callback( struct w_iface *w_iface, enum callback_type type, ui
|
||||
uint32_t size = 0;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = type;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
@ -72,7 +72,7 @@ void queue_vtable_callback_0_server_responded( struct w_iface *w_iface, gameserv
|
||||
struct callback_entry *entry;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = CALL_IFACE_VTABLE_0_SERVER_RESPONDED;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
@ -92,7 +92,7 @@ void queue_vtable_callback_0_add_player_to_list( struct w_iface *w_iface, const
|
||||
struct callback_entry *entry;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = CALL_IFACE_VTABLE_0_ADD_PLAYER_TO_LIST;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
@ -114,7 +114,7 @@ void queue_vtable_callback_0_rules_responded( struct w_iface *w_iface, const cha
|
||||
struct callback_entry *entry;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = CALL_IFACE_VTABLE_0_RULES_RESPONDED;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
@ -136,7 +136,7 @@ static void u_steam_networking_socket_debug_output( uint32_t nType, const char *
|
||||
struct callback_entry *entry;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = SOCKETS_DEBUG_OUTPUT;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
@ -157,7 +157,7 @@ void queue_cdecl_func_callback( w_cdecl_func func, void *data, uint32_t data_siz
|
||||
struct callback_entry *entry;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = CALL_CDECL_FUNC_DATA;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
@ -184,7 +184,7 @@ static void u_steam_api_warning_message_hook( int severity, const char *msg )
|
||||
struct callback_entry *entry;
|
||||
|
||||
size += sizeof(struct callback_entry);
|
||||
if (!(entry = (struct callback_entry *)malloc( size ))) return;
|
||||
if (!(entry = (struct callback_entry *)calloc( 1, size ))) return;
|
||||
|
||||
entry->callback.type = WARNING_MESSAGE_HOOK;
|
||||
size -= offsetof( struct callback_entry, callback );
|
||||
|
@ -65,49 +65,77 @@ struct callback
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
void (*W_CDECL pfnFunc)( uint32_t, const char * );
|
||||
UINT64 __pad;
|
||||
};
|
||||
uint32_t type;
|
||||
const char msg[1];
|
||||
} sockets_debug_output;
|
||||
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
void (*W_CDECL pFunction)( int32_t, const char * );
|
||||
UINT64 __pad;
|
||||
};
|
||||
int32_t severity;
|
||||
const char msg[1];
|
||||
} warning_message_hook;
|
||||
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
void (*W_CDECL pFunc)( void * );
|
||||
UINT64 __pad;
|
||||
};
|
||||
unsigned char data[1];
|
||||
} call_cdecl_func_data;
|
||||
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct w_iface *iface;
|
||||
UINT64 __pad;
|
||||
};
|
||||
uint64_t arg0;
|
||||
uint64_t arg1;
|
||||
} call_iface_vtable;
|
||||
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct w_iface *iface;
|
||||
UINT64 __pad;
|
||||
};
|
||||
gameserveritem_t_105 server[];
|
||||
} server_responded;
|
||||
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct w_iface *iface;
|
||||
UINT64 __pad;
|
||||
};
|
||||
int32_t score;
|
||||
float time_played;
|
||||
const char name[1];
|
||||
} add_player_to_list;
|
||||
|
||||
struct
|
||||
{
|
||||
union
|
||||
{
|
||||
struct w_iface *iface;
|
||||
UINT64 __pad;
|
||||
};
|
||||
const char rule_and_value[1];
|
||||
} rules_responded;
|
||||
};
|
||||
@ -241,7 +269,11 @@ struct w_request
|
||||
{
|
||||
struct u_request u_request;
|
||||
struct u_response u_response;
|
||||
union
|
||||
{
|
||||
gameserveritem_t_105 *details;
|
||||
UINT64 __pad;
|
||||
};
|
||||
};
|
||||
|
||||
#include <poppack.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user