mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
engine: common: fix fragbuf_t definition so it has true standard flexible array member
This commit is contained in:
parent
e9ee4beb9f
commit
bd2a44dbdd
@ -513,7 +513,7 @@ static fragbuf_t *Netchan_AllocFragbuf( int fragment_size )
|
||||
{
|
||||
fragbuf_t *buf;
|
||||
|
||||
buf = (fragbuf_t *)Mem_Calloc( net_mempool, sizeof( fragbuf_t ) + ( fragment_size - 1 ) );
|
||||
buf = (fragbuf_t *)Mem_Calloc( net_mempool, sizeof( fragbuf_t ) + fragment_size );
|
||||
MSG_Init( &buf->frag_message, "Frag Message", buf->frag_message_buf, fragment_size );
|
||||
|
||||
return buf;
|
||||
|
@ -190,7 +190,7 @@ typedef struct fragbuf_s
|
||||
char filename[MAX_OSPATH]; // name of the file to save out on remote host
|
||||
int foffset; // offset in file from which to read data
|
||||
int size; // size of data to read at that offset
|
||||
byte frag_message_buf[1]; // the actual data sits here (flexible)
|
||||
byte frag_message_buf[]; // the actual data sits here (flexible)
|
||||
} fragbuf_t;
|
||||
|
||||
// Waiting list of fragbuf chains
|
||||
|
Loading…
Reference in New Issue
Block a user