mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-09 20:21:10 +00:00
engine: client: netgraph: fix few global-buffer-overflow errors
This commit is contained in:
parent
d9a245dcb5
commit
1ba117a8e9
@ -281,7 +281,10 @@ static void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
|||||||
|
|
||||||
for( j = start; j < h; j++ )
|
for( j = start; j < h; j++ )
|
||||||
{
|
{
|
||||||
NetGraph_DrawRect( &fill, netcolors[NETGRAPH_NET_COLORS + j + extrap_point] );
|
int color = NETGRAPH_NET_COLORS + j + extrap_point;
|
||||||
|
color = Q_min( color, ARRAYSIZE( netcolors ) - 1 );
|
||||||
|
|
||||||
|
NetGraph_DrawRect( &fill, netcolors[color] );
|
||||||
fill.top--;
|
fill.top--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -297,7 +300,10 @@ static void NetGraph_DrawTimes( wrect_t rect, int x, int w )
|
|||||||
|
|
||||||
for( j = 0; j < h; j++ )
|
for( j = 0; j < h; j++ )
|
||||||
{
|
{
|
||||||
NetGraph_DrawRect( &fill, netcolors[NETGRAPH_NET_COLORS + j + oldh] );
|
int color = NETGRAPH_NET_COLORS + j + oldh;
|
||||||
|
color = Q_min( color, ARRAYSIZE( netcolors ) - 1 );
|
||||||
|
|
||||||
|
NetGraph_DrawRect( &fill, netcolors[color] );
|
||||||
fill.top--;
|
fill.top--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user