engine: client: fix rawchan_t definition so it has true standard flexible array member
This commit is contained in:
parent
3b3f057f6f
commit
e9ee4beb9f
2 changed files with 2 additions and 2 deletions
|
@ -1092,7 +1092,7 @@ rawchan_t *S_FindRawChannel( int entnum, qboolean create )
|
|||
if( !raw_channels[best] )
|
||||
{
|
||||
raw_samples = MAX_RAW_SAMPLES;
|
||||
raw_channels[best] = Mem_Calloc( sndpool, sizeof( *ch ) + sizeof( portable_samplepair_t ) * ( raw_samples - 1 ));
|
||||
raw_channels[best] = Mem_Calloc( sndpool, sizeof( *ch ) + sizeof( portable_samplepair_t ) * raw_samples );
|
||||
}
|
||||
|
||||
ch = raw_channels[best];
|
||||
|
|
|
@ -116,7 +116,7 @@ typedef struct rawchan_s
|
|||
float oldtime; // catch time jumps
|
||||
wavdata_t sound_info; // advance play position
|
||||
size_t max_samples; // buffer length
|
||||
portable_samplepair_t rawsamples[1]; // variable sized
|
||||
portable_samplepair_t rawsamples[]; // variable sized
|
||||
} rawchan_t;
|
||||
|
||||
typedef struct channel_s
|
||||
|
|
Loading…
Add table
Reference in a new issue