2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

Merge pull request #125 from nekonomicon/crtlib

public: crtlib.c: reduce memory usage.
This commit is contained in:
mittorn 2020-02-18 03:52:36 +07:00 committed by GitHub
commit a967caa91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -710,11 +710,11 @@ of all text functions.
char *va( const char *format, ... )
{
va_list argptr;
static char string[256][1024], *s;
static char string[16][1024], *s;
static int stringindex = 0;
s = string[stringindex];
stringindex = (stringindex + 1) & 255;
stringindex = (stringindex + 1) & 15;
va_start( argptr, format );
Q_vsnprintf( s, sizeof( string[0] ), format, argptr );
va_end( argptr );