mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: common: limit amount of delta encoded fields by 64 in GoldSrc protocol (because this is the maximum it allows anyway)
This commit is contained in:
@@ -1497,7 +1497,7 @@ static void Delta_ParseGSFields( sizebuf_t *msg, const delta_info_t *dt, const v
|
||||
|
||||
for( i = 0, pField = dt->pFields; i < dt->numFields; i++, pField++ )
|
||||
{
|
||||
int b = i >> 3;
|
||||
int b = Q_min( i >> 3, (int)sizeof( bits ) - 1 );
|
||||
int n = 1 << ( i & 7 );
|
||||
|
||||
if( FBitSet( bits[b], n ))
|
||||
@@ -1526,7 +1526,7 @@ void Delta_WriteGSFields( sizebuf_t *msg, int index, const void *from, const voi
|
||||
{
|
||||
if( !Delta_CompareField( pField, from, to ))
|
||||
{
|
||||
int b = i >> 3;
|
||||
int b = Q_min( i >> 3, (int)sizeof( bits ) - 1 );
|
||||
int n = 1 << ( i & 7 );
|
||||
|
||||
SetBits( bits[b], n );
|
||||
@@ -1540,7 +1540,7 @@ void Delta_WriteGSFields( sizebuf_t *msg, int index, const void *from, const voi
|
||||
|
||||
for( i = 0, pField = dt->pFields; i < dt->numFields; i++, pField++ )
|
||||
{
|
||||
int b = i >> 3;
|
||||
int b = Q_min( i >> 3, (int)sizeof( bits ) - 1 );
|
||||
int n = 1 << ( i & 7 );
|
||||
|
||||
if( FBitSet( bits[b], n ))
|
||||
|
||||
Reference in New Issue
Block a user