mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-07-21 20:56:22 +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;
|
uint32_t size = 0;
|
||||||
|
|
||||||
size += sizeof(struct callback_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 = type;
|
entry->callback.type = type;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
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;
|
struct callback_entry *entry;
|
||||||
|
|
||||||
size += sizeof(struct callback_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;
|
entry->callback.type = CALL_IFACE_VTABLE_0_SERVER_RESPONDED;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
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;
|
struct callback_entry *entry;
|
||||||
|
|
||||||
size += sizeof(struct callback_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;
|
entry->callback.type = CALL_IFACE_VTABLE_0_ADD_PLAYER_TO_LIST;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
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;
|
struct callback_entry *entry;
|
||||||
|
|
||||||
size += sizeof(struct callback_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;
|
entry->callback.type = CALL_IFACE_VTABLE_0_RULES_RESPONDED;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
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;
|
struct callback_entry *entry;
|
||||||
|
|
||||||
size += sizeof(struct callback_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;
|
entry->callback.type = SOCKETS_DEBUG_OUTPUT;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
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;
|
struct callback_entry *entry;
|
||||||
|
|
||||||
size += sizeof(struct callback_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;
|
entry->callback.type = CALL_CDECL_FUNC_DATA;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
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;
|
struct callback_entry *entry;
|
||||||
|
|
||||||
size += sizeof(struct callback_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;
|
entry->callback.type = WARNING_MESSAGE_HOOK;
|
||||||
size -= offsetof( struct callback_entry, callback );
|
size -= offsetof( struct callback_entry, callback );
|
||||||
|
@ -66,40 +66,64 @@ struct callback
|
|||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void (*W_CDECL pfnFunc)( uint32_t, const char * );
|
union
|
||||||
|
{
|
||||||
|
void (*W_CDECL pfnFunc)( uint32_t, const char * );
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
const char msg[1];
|
const char msg[1];
|
||||||
} sockets_debug_output;
|
} sockets_debug_output;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void (*W_CDECL pFunction)( int32_t, const char * );
|
union
|
||||||
|
{
|
||||||
|
void (*W_CDECL pFunction)( int32_t, const char * );
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
int32_t severity;
|
int32_t severity;
|
||||||
const char msg[1];
|
const char msg[1];
|
||||||
} warning_message_hook;
|
} warning_message_hook;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void (*W_CDECL pFunc)( void * );
|
union
|
||||||
|
{
|
||||||
|
void (*W_CDECL pFunc)( void * );
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
unsigned char data[1];
|
unsigned char data[1];
|
||||||
} call_cdecl_func_data;
|
} call_cdecl_func_data;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct w_iface *iface;
|
union
|
||||||
|
{
|
||||||
|
struct w_iface *iface;
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
uint64_t arg0;
|
uint64_t arg0;
|
||||||
uint64_t arg1;
|
uint64_t arg1;
|
||||||
} call_iface_vtable;
|
} call_iface_vtable;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct w_iface *iface;
|
union
|
||||||
|
{
|
||||||
|
struct w_iface *iface;
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
gameserveritem_t_105 server[];
|
gameserveritem_t_105 server[];
|
||||||
} server_responded;
|
} server_responded;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct w_iface *iface;
|
union
|
||||||
|
{
|
||||||
|
struct w_iface *iface;
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
int32_t score;
|
int32_t score;
|
||||||
float time_played;
|
float time_played;
|
||||||
const char name[1];
|
const char name[1];
|
||||||
@ -107,7 +131,11 @@ struct callback
|
|||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct w_iface *iface;
|
union
|
||||||
|
{
|
||||||
|
struct w_iface *iface;
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
const char rule_and_value[1];
|
const char rule_and_value[1];
|
||||||
} rules_responded;
|
} rules_responded;
|
||||||
};
|
};
|
||||||
@ -241,7 +269,11 @@ struct w_request
|
|||||||
{
|
{
|
||||||
struct u_request u_request;
|
struct u_request u_request;
|
||||||
struct u_response u_response;
|
struct u_response u_response;
|
||||||
gameserveritem_t_105 *details;
|
union
|
||||||
|
{
|
||||||
|
gameserveritem_t_105 *details;
|
||||||
|
UINT64 __pad;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <poppack.h>
|
#include <poppack.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user