engine: common: fix fragbuf_t definition so it has true standard flexible array member
This commit is contained in:
parent
e9ee4beb9f
commit
bd2a44dbdd
2 changed files with 2 additions and 2 deletions
|
@ -513,7 +513,7 @@ static fragbuf_t *Netchan_AllocFragbuf( int fragment_size )
|
||||||
{
|
{
|
||||||
fragbuf_t *buf;
|
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 );
|
MSG_Init( &buf->frag_message, "Frag Message", buf->frag_message_buf, fragment_size );
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
|
|
|
@ -190,7 +190,7 @@ typedef struct fragbuf_s
|
||||||
char filename[MAX_OSPATH]; // name of the file to save out on remote host
|
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 foffset; // offset in file from which to read data
|
||||||
int size; // size of data to read at that offset
|
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;
|
} fragbuf_t;
|
||||||
|
|
||||||
// Waiting list of fragbuf chains
|
// Waiting list of fragbuf chains
|
||||||
|
|
Loading…
Add table
Reference in a new issue