Browse Source

public: crtlib.c: reduce memory usage.

pull/2/head
Andrey Akhmichin 5 years ago
parent
commit
9a0da3cd4f
  1. 4
      public/crtlib.c

4
public/crtlib.c

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

Loading…
Cancel
Save